public boolean parseMessage ( WsByteBuffer buffer , boolean bExtractValue ) throws Exception { final boolean bTrace = TraceComponent . isAnyTracingEnabled ( ) ; boolean rc = false ; if ( ! isFirstLineComplete ( ) ) { if ( bTrace && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Parsing First Line" ) ; } rc = parseLine ( buffer ) ; } // if we've read the first line, then parse the headers // Note: we may come in with it true or it might be set to true above if ( isFirstLineComplete ( ) ) { // keep parsing headers until that returns the "finished" response rc = parseHeaders ( buffer , bExtractValue ) ; } if ( bTrace && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "parseMessage returning " + rc ) ; } return rc ; }
Parse a message from the input buffer . The input flag is whether or not to save the header value immediately or delay the extraction until the header value is queried .