question: synchronized void receive ( char oneChar ) throws IOException { if ( buffer == null ) { throw new IOException ( "Pipe is closed" ) ; } if ( lastReader != null && ! lastReader . isAlive ( ) ) { throw new IOException ( "Pipe broken" ) ; } lastWriter = Thread . currentThread ( ) ; try { while ( buffer != null && out == in ) { notifyAll ( ) ; wait ( 1000 ) ; if ( lastReader != null && ! lastReader . isAlive ( ) ) { throw new IOException ( "Pipe broken" ) ; } } } catch ( InterruptedException e ) { throw new InterruptedIOException ( ) ; } if ( buffer == null ) { throw new IOException ( "Pipe is closed" ) ; } if ( in == - 1 ) { in = 0 ; } buffer [ in ++ ] = oneChar ; if ( in == buffer . length ) { in = 0 ; } }
target:  Receives a char and stores it into the PipedReader. This called by PipedWriter.write() when writes occur. <p> If the buffer is full and the thread sending #receive is interrupted, the InterruptedIOException will be thrown.