This class is an OutputStream that implements one half a pipe and is useful for communication between threads. A PipedOutputStream must be connected to a PipedInputStream , which may be specified when the PipedOutputStream is created or with the connect( ) method. Data written to the PipedOutputStream is available for reading on the PipedInputStream . See OutputStream for information on the low-level methods for writing data to a PipedOutputStream . A FilterOutputStream can provide a higher-level interface for writing data to a PipedOutputStream . Figure 9-46. java.io.PipedOutputStreampublic class PipedOutputStream extends OutputStream { // Public Constructors public PipedOutputStream ( ); public PipedOutputStream (PipedInputStream snk ) throws IOException; // Public Instance Methods public void connect (PipedInputStream snk ) throws IOException; synchronized // Public Methods Overriding OutputStream public void close ( ) throws IOException; public void flush ( ) throws IOException; synchronized public void write (int b ) throws IOException; public void write (byte[ ] b , int off , int len ) throws IOException; } Passed ToPipedInputStream.{connect( ) , PipedInputStream( )} |