public static long toLong(Object ref, long offset) {
    if (LITTLE_ENDIAN) {
      return Long.reverseBytes(HBasePlatformDependent.getLong(ref, offset));
    }
    return HBasePlatformDependent.getLong(ref, offset);
  }
Reads a long value at the given Object's offset considering it was written in big-endian
format.
@return long value at offset
hbase-common/src/main/java/org/apache/hadoop/hbase/util/UnsafeAccess.java