Module java.base
Package java.io

Class PipedInputStream

java.lang.Object
java.io.InputStream
java.io.PipedInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class PipedInputStream extends InputStream
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. A pipe is said to be broken if a thread that was providing data bytes to the connected piped output stream is no longer alive.
Since:
1.0
See Also: