public static short getUByte(byte[] data, int offset) {
        return (short) (data[offset] & 0xFF);
    }
get the unsigned value of a byte.

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