public synchronized void flush ( ) throws IOException { if ( sink != null ) { if ( sink . closedByReader || closed ) { throw new IOException ( "Pipe closed" ) ; } synchronized ( sink ) { sink . notifyAll ( ) ; } } }
Flushes this output stream and forces any buffered output characters to be written out . This will notify any readers that characters are waiting in the pipe .