public static int toInt(ByteBuffer buf, int offset) {
    if (LITTLE_ENDIAN) {
      return Integer.reverseBytes(getAsInt(buf, offset));
    }
    return getAsInt(buf, offset);
  }
Reads an int value at the given buffer's offset considering it was written in big-endian
format.
@return int value at offset
hbase-common/src/main/java/org/apache/hadoop/hbase/util/UnsafeAccess.java