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