protected boolean checkBuffer ( ) throws IOException { if ( ! enableMultiReadofPostData ) { if ( null != this . buffer ) { if ( this . buffer . hasRemaining ( ) ) { return true ; } this . buffer . release ( ) ; this . buffer = null ; } try { this . buffer = this . isc . getRequestBodyBuffer ( ) ; if ( null != this . buffer ) { // record the new amount of data read from the channel this . bytesRead += this . buffer . remaining ( ) ; // Tr.debug(tc, "Buffer=" + WsByteBufferUtils.asString(this.buffer)); return true ; } return false ; } catch ( IOException e ) { this . error = e ; throw e ; } } else { return checkMultiReadBuffer ( ) ; } }
Check the input buffer for data . If necessary attempt a read for a new buffer .