BlockingInputStream
is a combination of an input stream and an output stream, connected through a (circular) buffer in memory. It is intended for coupling producer threads to consumer threads via a (byte) stream. When the buffer is full producer threads will be blocked until the buffer has some free space again. When the buffer is empty the consumer threads will be blocked until some bytes are available again. Closing of the output stream will block until the inputstream is closed. A special version of the close function enables the consumer threads to specify that an exception has occurred. This will cause producer calls to be unblocked and throw an IOException containing this exception as cause.
@author Chris Offerman
|
|
|
|
|
|
|
|