public static Short decodeShortObj ( byte [ ] src , int srcOffset ) throws CorruptEncodingException { try { int b = src [ srcOffset ] ; if ( b == NULL_BYTE_HIGH || b == NULL_BYTE_LOW ) { return null ; } return decodeShort ( src , srcOffset + 1 ) ; } catch ( IndexOutOfBoundsException e ) { throw new CorruptEncodingException ( null , e ) ; } }
Decodes a signed Short object from exactly 1 or 3 bytes . If null is returned then 1 byte was read .