public static short toShort(byte[] bytes, int offset) {
        if (LITTLE_ENDIAN) {
            return Short
                    .reverseBytes(HBasePlatformDependent.getShort(bytes, offset + BYTE_ARRAY_BASE_OFFSET));
        } else {
            return HBasePlatformDependent.getShort(bytes, offset + BYTE_ARRAY_BASE_OFFSET);
        }
    }
Converts a byte array to a short value considering it was written in big-endian format.

@param bytes  byte array
@param offset offset into array
@return the short value
stroom-bytebuffer/src/main/java/stroom/bytebuffer/hbase/UnsafeAccess.java