question: protected final boolean readAvailableBlocking ( ) throws IOException { char [ ] buffer = myBuffer ; StringBuilder token = myTextBuffer ; token . setLength ( 0 ) ; boolean read = false ; int n ; while ( ( n = myReader . read ( buffer ) ) > 0 ) { if ( myScheduledSubmitter != null ) myScheduledSubmitter . cancel ( true ) ; read = true ; synchronized ( myTextBuffer ) { processLine ( buffer , token , n ) ; } myScheduledSubmitter = myExecutorService . submit ( myTokenSubmitter ) ; } submitToken ( ) ; return read ; }
target:  Reads data with blocking. Should be used in case when ready method always returns false for your input stream. Should be used if we want to to make our reader exit when end of stream reached. Could be used if we prefer IO-blocking over CPU sleeping.