Class ChannelInputStream
java.lang.Object
java.io.InputStream
org.eclipse.net4j.buffer.BufferInputStream
org.eclipse.net4j.channel.ChannelInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable, IBufferHandler
- Author:
- Eike Stepper
-
Field Summary
Fields inherited from class BufferInputStream
DEFAULT_MILLIS_BEFORE_TIMEOUT, DEFAULT_MILLIS_INTERRUPT_CHECK, NO_TIMEOUT -
Constructor Summary
ConstructorsConstructorDescriptionChannelInputStream(IChannel channel) ChannelInputStream(IChannel channel, long millisBeforeTimeout) -
Method Summary
Modifier and TypeMethodDescriptionlonglongDeprecated.intread()Returns the next byte, orIOUtil.EOFat end of stream.voidsetMillisBeforeTimeout(long millisBeforeTimeout) voidsetMillisInterruptCheck(long millisInterruptCheck) Deprecated.Periodic interrupt checks are no longer performed byBufferInputStream; this value is retained only for compatibility with existing callers.toString()Methods inherited from class BufferInputStream
abort, close, closeChannel, ensureBuffer, getAbortCause, getException, handleBuffer, isCCAM, read, restartTimeout, setExceptionMethods inherited from class InputStream
available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
ChannelInputStream
-
ChannelInputStream
-
-
Method Details
-
getChannel
-
getMillisBeforeTimeout
public long getMillisBeforeTimeout()- Overrides:
getMillisBeforeTimeoutin classBufferInputStream
-
setMillisBeforeTimeout
public void setMillisBeforeTimeout(long millisBeforeTimeout) -
getMillisInterruptCheck
Deprecated.Periodic interrupt checks are no longer performed byBufferInputStream.- Overrides:
getMillisInterruptCheckin classBufferInputStream- Since:
- 2.0
-
setMillisInterruptCheck
Deprecated.Periodic interrupt checks are no longer performed byBufferInputStream; this value is retained only for compatibility with existing callers.- Since:
- 2.0
-
read
Description copied from class:BufferInputStreamReturns the next byte, orIOUtil.EOFat end of stream.The monitor protects acquisition and access to the current buffer. If this method waits for a buffer,
Object.wait()releases the monitor fully, including this method's reentrant acquisition, so producers and lifecycle operations can proceed. An exhausted buffer is detached under the monitor and released afterward.- Overrides:
readin classBufferInputStream- Throws:
IOException- if waiting for a buffer times out
-
toString
- Overrides:
toStringin classBufferInputStream
-
BufferInputStream.