Examples of PipedInputStream

PipedInputStream is a class which receives information on a communications pipe. When two threads want to pass data back and forth, one creates a piped output stream and the other creates a piped input stream.
@see PipedOutputStream

A piped input stream should be connected to a piped output stream; the piped input stream then provides whatever data bytes are written to the piped output stream. Typically, data is read from a PipedInputStream object by one thread and data is written to the corresponding PipedOutputStream by some other thread. Attempting to use both objects from a single thread is not recommended, as it may deadlock the thread. The piped input stream contains a buffer, decoupling read operations from write operations, within limits.
@author James Gosling
@version 1.28, 07/07/98
@see java.io.PipedOutputStream
@since JDK1.0