Returns the number of bytes that can be read from this input stream without blocking.
0 if this input stream has been
closed by invoking its close() method, or if the pipe
is unconnected, or
broken.
IOException | if an I/O error occurs. |
Closes this piped input stream and releases any system resources associated with the stream.
IOException | if an I/O error occurs. |
Reads the next byte of data from this piped input stream. The
value byte is returned as an int in the range
0 to 255.
This method blocks until input data is available, the end of the
stream is detected, or an exception is thrown.
-1 if the end of the
stream is reached.
IOException | if the pipe is
unconnected,
broken, closed,
or if an I/O error occurs. |
Reads up to len bytes of data from this piped input
stream into an array of bytes. Less than len bytes
will be read if the end of the data stream is reached or if
len exceeds the pipe's buffer size.
If len is zero, then no bytes are read and 0 is returned;
otherwise, the method blocks until at least 1 byte of input is
available, end of the stream has been detected, or an exception is
thrown.
b | the buffer into which the data is read. | |
off | the start offset in the destination array b | |
len | the maximum number of bytes read. |
-1 if there is no more data because the end of
the stream has been reached.
IOException | if the pipe is broken,
unconnected,
closed, or if an I/O error occurs. |
Diagram: InputStream