[ Web Proxy ]
URL:
Viewing: https://docs.oracle.com/en/java/javase/24/docs/api/java.base/java/io/PipedInputStream.html [Back]  [Original]

PipedInputStream (Java SE 24 & JDK 24)
Contents 
Hide sidebar ❮❯ Show sidebar
  1. Description
  2. Field Summary
  3. Constructor Summary
  4. Method Summary
  5. Field Details
    1. PIPE_SIZE
    2. buffer
    3. in
    4. out
  6. Constructor Details
    1. PipedInputStream(PipedOutputStream)
    2. PipedInputStream(PipedOutputStream, int)
    3. PipedInputStream()
    4. PipedInputStream(int)
  7. Method Details
    1. connect(PipedOutputStream)
    2. receive(int)
    3. read()
    4. read(byte[], int, int)
    5. available()
    6. close()

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:


Web Proxy Viewer  |  New URL  |  Original Page