Class MessageInputStream
java.lang.Object
java.io.InputStream
org.eclipse.jetty.websocket.core.internal.messages.MessageInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
,MessageSink
Support class for reading a WebSocket BINARY message via a InputStream.
An InputStream that can access a queue of ByteBuffer payloads, along with expected InputStream blocking behavior.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Consume the frame payload to the message.void
close()
int
read()
int
read
(byte[] b, int off, int len) int
read
(ByteBuffer buffer) void
setTimeout
(long timeoutMs) Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
MessageInputStream
public MessageInputStream()
-
-
Method Details
-
accept
Description copied from interface:MessageSink
Consume the frame payload to the message.- Specified by:
accept
in interfaceMessageSink
- Parameters:
frame
- the frame, its payload (and fin state) to appendcallback
- the callback for how the frame was consumed
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
setTimeout
public void setTimeout(long timeoutMs)
-