public static int toInt(Object ref, long offset) {
    if (LITTLE_ENDIAN) {
      return Integer.reverseBytes(HBasePlatformDependent.getInt(ref, offset));
    }
    return HBasePlatformDependent.getInt(ref, offset);
  }
Reads a int value at the given Object'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