Closeable
, AutoCloseable
class TimeoutPipedInputStream extends PipedInputStream
buffer, in, out, PIPE_SIZE
Constructor | Description |
---|---|
TimeoutPipedInputStream(int pipeSize) |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
Overridden to save state.
|
int |
read() |
|
void |
setReadTimeout(int ms) |
Must be called before blocking read call.
|
(package private) void |
x_receivedLast() |
To save state.
|
mark, markSupported, read, readAllBytes, readNBytes, reset, skip, transferTo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
available, connect, read, receive
public int read() throws IOException
read
in class PipedInputStream
SocketTimeoutException
- if timeout is reachedIOException
public void setReadTimeout(int ms)
ms
- less than or equal to zero means forevervoid x_receivedLast()
public void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
close
in class PipedInputStream
IOException