private static byte decodeOneByteItem(byte[] data, int index) {
        // null item
        if ((data[index] & 0xFF) == OFFSET_SHORT_ITEM) {
            return (byte) (data[index] - OFFSET_SHORT_ITEM);
        }
        // single byte item
        if ((data[index] & 0xFF) < OFFSET_SHORT_ITEM) {
            return data[index];
        }
        // single byte item
        if ((data[index] & 0xFF) == OFFSET_SHORT_ITEM + 1) {
            return data[index + 1];
        }
        return 0;
    }
private static byte decodeOneByteItem ( byte [ ] data , int index ) { if ( ( data [ index ] & 0xFF ) == OFFSET_SHORT_ITEM ) { return ( byte ) ( data [ index ] - OFFSET_SHORT_ITEM ) ; } if ( ( data [ index ] & 0xFF ) < OFFSET_SHORT_ITEM ) { return data [ index ] ; } if ( ( data [ index ] & 0xFF ) == OFFSET_SHORT_ITEM + 1 ) { return data [ index + 1 ] ; } return 0 ; }
/*
****************************************************** DECODING *
****************************************************