protected final boolean readAvailableNonBlocking() throws IOException {
  char[] buffer=myBuffer;
  StringBuilder token=myTextBuffer;
  token.setLength(0);
  boolean read=false;
  while (myReader.ready()) {
    int n=myReader.read(buffer);
    if (n <= 0)     break;
    read=true;
    processLine(buffer,token,n);
  }
  submitToken();
  return read;
}

protected final boolean readAvailableNonBlocking ( ) throws IOException { char [ ] buffer = myBuffer ; StringBuilder token = myTextBuffer ; token . setLength ( 0 ) ; boolean read = false ; while ( myReader . ready ( ) ) { int n = myReader . read ( buffer ) ; if ( n <= 0 ) break ; read = true ; processLine ( buffer , token , n ) ; } submitToken ( ) ; return read ; }
reads as much data as possible without blocking . relies on inputstream . ready method . in case of doubts look at # readavailableblocking
