question: protected boolean handleSignature ( boolean consumeFirstByte , boolean throwException ) throws IOException { if ( consumeFirstByte ) { ++ _inputPtr ; } if ( _inputPtr >= _inputEnd ) { _loadMoreGuaranteed ( ) ; } if ( _inputBuffer [ _inputPtr ] != SmileConstants . HEADER_BYTE_2 ) { if ( throwException ) { _reportError ( "Malformed content: signature not valid, starts with 0x3a but followed by 0x" + Integer . toHexString ( _inputBuffer [ _inputPtr ] ) + ", not 0x29" ) ; } return false ; } if ( ++ _inputPtr >= _inputEnd ) { _loadMoreGuaranteed ( ) ; } if ( _inputBuffer [ _inputPtr ] != SmileConstants . HEADER_BYTE_3 ) { if ( throwException ) { _reportError ( "Malformed content: signature not valid, starts with 0x3a, 0x29, but followed by 0x" + Integer . toHexString ( _inputBuffer [ _inputPtr ] ) + ", not 0xA" ) ; } return false ; } if ( ++ _inputPtr >= _inputEnd ) { _loadMoreGuaranteed ( ) ; } int ch = _inputBuffer [ _inputPtr ++ ] ; int versionBits = ( ch > > 4 ) & 0x0F ; if ( versionBits != SmileConstants . HEADER_VERSION_0 ) { _reportError ( "Header version number bits (0x" + Integer . toHexString ( versionBits ) + ") indicate unrecognized version; only 0x0 handled by parser" ) ; } if ( ( ch & SmileConstants . HEADER_BIT_HAS_SHARED_NAMES ) == 0 ) { _seenNames = null ; _seenNameCount = - 1 ; } if ( ( ch & SmileConstants . HEADER_BIT_HAS_SHARED_STRING_VALUES ) != 0 ) { _seenStringValues = NO_STRINGS ; _seenStringValueCount = 0 ; } _mayContainRawBinary = ( ( ch & SmileConstants . HEADER_BIT_HAS_RAW_BINARY ) != 0 ) ; return true ; }
target:  Helper method called when it looks like input might contain the signature; and it is necessary to detect and handle signature to get configuration information it might have.