public static int getUShortBE(byte[] data, int offset) {
        int b0 = data[offset] & 0xFF;
        int b1 = data[offset + 1] & 0xFF;
        return (b0 << 8) + (b1);
    }
Get a BE unsigned short value from a byte array

@param data   the byte array
@param offset a starting offset into the byte array
@return the unsigned short (16-bit) value in an integer
tika-core/src/main/java/org/apache/tika/io/EndianUtils.java