public class DisconnectableInputStream extends BulkReadInputStream
InputStream which reads from the source InputStream. In addition, when the InputStream is
closed, all threads blocked reading from the stream will receive an end-of-stream.| Constructor and Description |
|---|
DisconnectableInputStream(InputStream source,
ExecutorFactory executorFactory) |
DisconnectableInputStream(InputStream source,
ExecutorFactory executorFactory,
int bufferLength) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this
InputStream for reading. |
int |
read(byte[] bytes,
int pos,
int count) |
readavailable, mark, markSupported, read, reset, skippublic DisconnectableInputStream(InputStream source, ExecutorFactory executorFactory)
public DisconnectableInputStream(InputStream source, ExecutorFactory executorFactory, int bufferLength)
public int read(byte[] bytes,
int pos,
int count)
throws IOException
read in class BulkReadInputStreamIOExceptionpublic void close()
throws IOException
InputStream for reading. Any threads blocked in read() will receive a AsynchronousCloseException. Also requests that the reader thread stop reading, if possible,
but does not block waiting for this to happen.
NOTE: this method does not close the source input stream.
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionCopyright © 2013. All rights reserved