protected VirtualConnection readInternal ( long numBytes , TCPReadCompletedCallback readCallback , boolean forceQueue , int timeout ) { if ( timeout == IMMED_TIMEOUT ) { immediateTimeout ( ) ; return null ; } if ( timeout == ABORT_TIMEOUT ) { abort ( ) ; immediateTimeout ( ) ; return null ; } setIOAmount ( numBytes ) ; setLastIOAmt ( 0 ) ; setIODoneAmount ( 0 ) ; setReadCompletedCallback ( readCallback ) ; setForceQueue ( forceQueue ) ; setTimeoutTime ( timeout ) ; // IMPROVEMENT: buffers should be preprocessed before calling read, // postprocessed after return processAsyncReadRequest ( ) ; }
internal async read entry point