public static int bytesToUShortBE(byte[] bytes, int off) {
        return ((bytes[off] & 255) << 8) + (bytes[off + 1] & 255);
    }
@Test
    public void testBytesToUShortBE() {
        assertEquals(-12345 & 0xffff,
                ByteUtils.bytesToUShortBE(SHORT_12345_BE, 0));
    }