Tech Tips, February 8, 2001. This tip was developed using Java TM 2 SDK, Standard Edition, v 1.3. This issue of the JDC Tech Tips is written by Glen McClusky.
Data written on the output stream shows up on the input stream at the other end of the pipe.
You can think of pipes as a buffer, with a connection at each end. The PipedReader reads data written by the PipedWriter . PipeDemo1 then creates and starts an instance of MyThread . For example, if a thread tries to read from a pipe, and no input is available, the thread blocks, that is, it waits until input is available, preventing other activity on the thread. The thread also blocks if it writes into a pipe, and the pipe buffer fills up.