public int encodeInt(byte[] buff, int offset, int val) {
    return Bytes.putInt(buff, offset, val);
  }
Write instance {@code val} into buffer {@code buff}.
hbase-common/src/main/java/org/apache/hadoop/hbase/types/RawInteger.java