public static Boolean decodeBooleanObj ( byte [ ] src , int srcOffset ) throws CorruptEncodingException { try { switch ( src [ srcOffset ] ) { case NULL_BYTE_LOW : case NULL_BYTE_HIGH : return null ; case ( byte ) 128 : return Boolean . TRUE ; default : return Boolean . FALSE ; } } catch ( IndexOutOfBoundsException e ) { throw new CorruptEncodingException ( null , e ) ; } }
Decodes a Boolean object from exactly 1 byte .