ChunkedInput that fetches data chunk by chunk for use with WebSocket chunked transfers.
Each chunk from the input data will be wrapped within a ContinuationWebSocketFrame.
At the end of the input data, ContinuationWebSocketFrame with finalFragment will be written.
| Modifier and Type | Field and Description |
|---|---|
| private final ChunkedInput | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public | WebSocketChunkedInput(ChunkedInput<ByteBuf>
ChunkedInput containing data to writeCreates a new instance using the specified input. |
| public | WebSocketChunkedInput(ChunkedInput<ByteBuf>
ChunkedInput containing data to writeRSV1, RSV2, RSV3 used for extensions rsv)Creates a new instance using the specified input. |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements io. |
| public boolean | Returns: true if and only if there is no data left in the stream
and the stream has reached at its end.Implements io. true if and only if there is no data left in the stream
and the stream has reached at its end.
|
| public long | |
| public long | progress()
Implements io. |
| public WebSocketFrame | Returns: WebSocketFrame contain chunk of dataChannelHandlerContext context of channelHandlerImplements io.
Deprecated
Use
readChunk(ByteBufAllocator).
|
| public WebSocketFrame | Returns: WebSocketFrame contain chunk of dataImplements io. |
| input | back to summary |
|---|---|
| private final ChunkedInput<ByteBuf> input | |
| rsv | back to summary |
|---|---|
| private final int rsv | |
| WebSocketChunkedInput | back to summary |
|---|---|
| public WebSocketChunkedInput(ChunkedInput<ByteBuf> input) Creates a new instance using the specified input.
| |
| WebSocketChunkedInput | back to summary |
|---|---|
| public WebSocketChunkedInput(ChunkedInput<ByteBuf> input, int rsv) Creates a new instance using the specified input.
| |
| close | back to summary |
|---|---|
| public void close() throws Exception Implements io. Releases the resources associated with the input.
| |
| isEndOfInput | back to summary |
|---|---|
| public boolean isEndOfInput() throws Exception Implements io. Doc from io. Return
| |
| length | back to summary |
|---|---|
| public long length() Implements io. Doc from io. Returns the length of the input.
| |
| progress | back to summary |
|---|---|
| public long progress() Implements io. Doc from io. Returns current transfer progress.
| |
| readChunk | back to summary |
|---|---|
| public WebSocketFrame readChunk(ChannelHandlerContext ctx) throws Exception Implements io. Deprecated Use
| |
| readChunk | back to summary |
|---|---|
| public WebSocketFrame readChunk(ByteBufAllocator allocator) throws Exception Implements io. Fetches a chunked data from the stream. Once this method returns the last chunk
and thus the stream has reached at its end, any subsequent
| |