public static int toInt(ByteBuffer buffer, int offset) {
    return ConverterHolder.BEST_CONVERTER.toInt(buffer, offset);
  }
Reads an int value at the given buffer's offset.
@param buffer input byte buffer to read
@param offset input offset where int is
@return int value at offset
hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java