code: public static byte[] writeInt(int v, byte[] b, int offset) {
          b[offset] = (byte) v;
          b[offset + 1] = (byte) (v >> 8);
          b[offset + 2] = (byte) (v >> 16);
          b[offset + 3] = (byte) (v >> 24);
  
          return b;
      }
docs: Write a 32 bit int as LITTLE_ENDIAN to
  the given array <code>b</code> at offset <code>offset</code>.
  
  @param v the int to write
  @param b the byte array to write to
  @param offset the offset at which to start writing in the array