public GenericAnalyticsResponse parse ( ) throws Exception { try { parser . parse ( ) ; //discard only if EOF is not thrown responseContent . discardReadBytes ( ) ; LOGGER . trace ( "Received last chunk and completed parsing for requestId {}" , requestID ) ; } catch ( EOFException ex ) { //ignore as we expect chunked responses LOGGER . trace ( "Still expecting more data for requestId {}" , requestID ) ; } //return back response only once if ( ! this . sentResponse && this . response != null ) { this . sentResponse = true ; return this . response ; } return null ; }
Instruct the parser to run a new parsing cycle on the current response content .