question: public synchronized boolean ready ( ) throws IOException { if ( ! connected ) { throw new IOException ( "Pipe not connected" ) ; } else if ( closedByReader ) { throw new IOException ( "Pipe closed" ) ; } else if ( writeSide != null && ! writeSide . isAlive ( ) && ! closedByWriter && ( in < 0 ) ) { throw new IOException ( "Write end dead" ) ; } if ( in < 0 ) { return false ; } else { return true ; } }
target:  Tell whether this stream is ready to be read.  A piped character stream is ready if the circular buffer is not empty.