| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private UTF8Checker | |
| private final ExtensionFunction | |
| private boolean | |
| private final ChannelFunction[] | |
| private Masker | |
| private final int | |
| protected final WebSocketFrameType |
| Access | Constructor and Description |
|---|---|
| protected | StreamSourceFrameChannel(WebSocketChannel wsChannel, WebSocketFrameType type, PooledByteBuffer pooled, long frameLength)
|
| protected | StreamSourceFrameChannel(WebSocketChannel wsChannel, WebSocketFrameType type, int rsv, boolean finalFragment, PooledByteBuffer pooled, long frameLength, Masker masker, ChannelFunction... functions)
|
| Modifier and Type | Method and Description |
|---|---|
| protected void | afterRead(ByteBuffer
the buffer, int ByteBuffer into which the data was readthe position it was written to position, int the number of bytes there were written length)Called after data was read into the |
| private void | |
| protected void | |
| public void | |
| protected WebSocketChannel | |
| public int | |
| public WebSocketFrameType | |
| public WebSocketChannel | |
| pack-priv int | |
| protected void | |
| public boolean | |
| protected PooledByteBuffer | processFrameData(PooledByteBuffer frameData, boolean lastFragmentOfFrame)
Overrides io.
|
| public int | read(ByteBuffer
The buffer into which bytes are to be transferred dst)Overrides io. Implements java. Reads a sequence of bytes from this channel into the given buffer. |
| public final long | read(ByteBuffer[]
The buffers into which bytes are to be transferred dsts)Overrides io. Implements java. Reads a sequence of bytes from this channel into the given buffers. |
| public long | read(ByteBuffer[]
The buffers into which bytes are to be transferred dsts, int The offset within the buffer array of the first buffer into
which bytes are to be transferred; must be non-negative and no
larger than offset, int dsts.lengthThe maximum number of buffers to be accessed; must be
non-negative and no larger than
length)dsts.length - offsetOverrides io. Implements java. Reads a sequence of bytes from this channel into a subsequence of the given buffers. |
| public final long | transferTo(long
the position within the file from which the transfer is to begin position, long the number of bytes to be transferred count, FileChannel the file to write to target)Overrides io. Implements org. Transfers bytes into the given file from this channel. |
| public final long | transferTo(long
the number of bytes to be transferred count, ByteBuffer the buffer to copy through. throughBuffer, StreamSinkChannel the destination to write to target)Overrides io. Implements org. Transfers bytes into the given channel target. |
| checker | back to summary |
|---|---|
| private UTF8Checker checker | |
| extensionFunction | back to summary |
|---|---|
| private final ExtensionFunction extensionFunction | |
| finalFragment | back to summary |
|---|---|
| private boolean finalFragment | |
| functions | back to summary |
|---|---|
| private final ChannelFunction[] functions | |
| masker | back to summary |
|---|---|
| private Masker masker | |
| rsv | back to summary |
|---|---|
| private final int rsv | |
| type | back to summary |
|---|---|
| protected final WebSocketFrameType type | |
| StreamSourceFrameChannel | back to summary |
|---|---|
| protected StreamSourceFrameChannel(WebSocketChannel wsChannel, WebSocketFrameType type, PooledByteBuffer pooled, long frameLength) | |
| StreamSourceFrameChannel | back to summary |
|---|---|
| protected StreamSourceFrameChannel(WebSocketChannel wsChannel, WebSocketFrameType type, int rsv, boolean finalFragment, PooledByteBuffer pooled, long frameLength, Masker masker, ChannelFunction... functions) | |
| afterRead | back to summary |
|---|---|
| protected void afterRead(ByteBuffer buffer, int position, int length) throws IOException Called after data was read into the
| |
| checkComplete | back to summary |
|---|---|
| private void checkComplete() throws IOException | |
| checker | back to summary |
|---|---|
| protected void checker(ByteBuffer buffer, int position, int length, boolean complete) throws IOException | |
| finalFrame | back to summary |
|---|---|
| public void finalFrame() | |
| getFramedChannel | back to summary |
|---|---|
| protected WebSocketChannel getFramedChannel() Overrides io.
| |
| getRsv | back to summary |
|---|---|
| public int getRsv() Return the rsv which is used for extensions. | |
| getType | back to summary |
|---|---|
| public WebSocketFrameType getType() Return the | |
| getWebSocketChannel | back to summary |
|---|---|
| public WebSocketChannel getWebSocketChannel() | |
| getWebSocketFrameCount | back to summary |
|---|---|
| pack-priv int getWebSocketFrameCount() | |
| handleHeaderData | back to summary |
|---|---|
| protected void handleHeaderData(FrameHeaderData headerData) Overrides io.
| |
| isFinalFragment | back to summary |
|---|---|
| public boolean isFinalFragment() Flag to indicate if this frame is the final fragment in a message. The first fragment (frame) may also be the final fragment. | |
| processFrameData | back to summary |
|---|---|
| protected PooledByteBuffer processFrameData(PooledByteBuffer frameData, boolean lastFragmentOfFrame) throws IOException Overrides io.
| |
| read | back to summary |
|---|---|
| public int read(ByteBuffer dst) throws IOException Overrides io. Implements java. Doc from java. Reads a sequence of bytes from this channel into the given buffer. An attempt is made to read up to r bytes from the channel,
where r is the number of bytes remaining in the buffer, that is,
Suppose that a byte sequence of length n is read, where
A read operation might not fill the buffer, and in fact it might not read any bytes at all. Whether or not it does so depends upon the nature and state of the channel. A socket channel in non-blocking mode, for example, cannot read any more bytes than are immediately available from the socket's input buffer; similarly, a file channel cannot read any more bytes than remain in the file. It is guaranteed, however, that if a channel is in blocking mode and there is at least one byte remaining in the buffer then this method will block until at least one byte is read. This method may be invoked at any time. If another thread has already initiated a read operation upon this channel, however, then an invocation of this method will block until the first operation is complete.
| |
| read | back to summary |
|---|---|
| public final long read(ByteBuffer[] dsts) throws IOException Overrides io. Implements java. Doc from java. Reads a sequence of bytes from this channel into the given buffers. An invocation of this method of the form c.read(dsts, 0, dsts.length);
| |
| read | back to summary |
|---|---|
| public long read(ByteBuffer[] dsts, int offset, int length) throws IOException Overrides io. Implements java. Doc from java. Reads a sequence of bytes from this channel into a subsequence of the given buffers. An invocation of this method attempts to read up to r bytes from this channel, where r is the total number of bytes remaining in the specified subsequence of the given buffer array, that is, dsts[offset].remaining() + dsts[offset+1].remaining() + ... + dsts[offset+length-1].remaining() Suppose that a byte sequence of length n is read, where
This method may be invoked at any time. If another thread has already initiated a read operation upon this channel, however, then an invocation of this method will block until the first operation is complete.
| |
| transferTo | back to summary |
|---|---|
| public final long transferTo(long position, long count, FileChannel target) throws IOException Overrides io. Implements org. Doc from org. Transfers bytes into the given file from this channel. Using this method in preference to
If the current thread is interrupted when this method is called, it may throw a
| |
| transferTo | back to summary |
|---|---|
| public final long transferTo(long count, ByteBuffer throughBuffer, StreamSinkChannel target) throws IOException Overrides io. Implements org. Doc from org. Transfers bytes into the given channel target. On some platforms, this may avoid copying bytes between user
and kernel space. On other platforms, bytes are passed through the
If the current thread is interrupted when this method is called, it may throw a
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| pack-priv final int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| limit | back to summary |
|---|---|
| pack-priv final int limit | |
| position | back to summary |
|---|---|
| pack-priv final int position | |
| Bounds | back to summary |
|---|---|
| pack-priv Bounds(int position, int limit) | |