public static int putInt(byte[] bytes, int offset, int val) {
    if (LITTLE_ENDIAN) {
      val = Integer.reverseBytes(val);
    }
    HBasePlatformDependent.putInt(bytes, offset + BYTE_ARRAY_BASE_OFFSET, val);
    return offset + Bytes.SIZEOF_INT;
  }
Put an int value out to the specified byte array position in big-endian format.
@param bytes  the byte array
@param offset position in the array
@param val    int to write out
@return incremented offset
hbase-common/src/main/java/org/apache/hadoop/hbase/util/UnsafeAccess.java