public abstract class FixedPayloadFrameSourceChannel extends StreamSourceFrameChannel
type| Modifier | Constructor and Description |
|---|---|
protected |
FixedPayloadFrameSourceChannel(WebSocketChannel wsChannel,
WebSocketFrameType type,
long payloadSize,
int rsv,
boolean finalFragment,
org.xnio.Pooled<ByteBuffer> pooled,
long frameLength,
ChannelFunction... functions) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterRead(ByteBuffer buffer,
int position,
int length)
Called after data was read into the
ByteBuffer |
protected void |
handleHeaderData(FrameHeaderData headerData) |
int |
read(ByteBuffer dst) |
long |
read(ByteBuffer[] dsts) |
long |
read(ByteBuffer[] dsts,
int offset,
int length) |
long |
transferTo(long count,
ByteBuffer throughBuffer,
org.xnio.channels.StreamSinkChannel target) |
long |
transferTo(long position,
long count,
FileChannel target) |
discard, finalFrame, getFramedChannel, getRsv, getType, getWebSocketChannel, isFinalFragmentawaitReadable, awaitReadable, close, complete, getCloseSetter, getIoThread, getOption, getReadFrameCount, getReadSetter, getReadThread, getWorker, isComplete, isOpen, isReadResumed, lastFrame, resumeReads, setOption, shutdownReads, supportsOption, suspendReads, wakeupReadsprotected FixedPayloadFrameSourceChannel(WebSocketChannel wsChannel, WebSocketFrameType type, long payloadSize, int rsv, boolean finalFragment, org.xnio.Pooled<ByteBuffer> pooled, long frameLength, ChannelFunction... functions)
protected void handleHeaderData(FrameHeaderData headerData)
public final long transferTo(long position,
long count,
FileChannel target)
throws IOException
transferTo in interface org.xnio.channels.StreamSourceChanneltransferTo in class AbstractFramedStreamSourceChannel<WebSocketChannel,StreamSourceFrameChannel,StreamSinkFrameChannel>IOExceptionpublic final long transferTo(long count,
ByteBuffer throughBuffer,
org.xnio.channels.StreamSinkChannel target)
throws IOException
transferTo in interface org.xnio.channels.StreamSourceChanneltransferTo in class AbstractFramedStreamSourceChannel<WebSocketChannel,StreamSourceFrameChannel,StreamSinkFrameChannel>IOExceptionpublic int read(ByteBuffer dst) throws IOException
read in interface ReadableByteChannelread in class AbstractFramedStreamSourceChannel<WebSocketChannel,StreamSourceFrameChannel,StreamSinkFrameChannel>IOExceptionpublic final long read(ByteBuffer[] dsts) throws IOException
read in interface ScatteringByteChannelread in class AbstractFramedStreamSourceChannel<WebSocketChannel,StreamSourceFrameChannel,StreamSinkFrameChannel>IOExceptionpublic long read(ByteBuffer[] dsts, int offset, int length) throws IOException
read in interface ScatteringByteChannelread in class AbstractFramedStreamSourceChannel<WebSocketChannel,StreamSourceFrameChannel,StreamSinkFrameChannel>IOExceptionprotected void afterRead(ByteBuffer buffer, int position, int length) throws IOException
ByteBufferbuffer - the ByteBuffer into which the data was readposition - the position it was written tolength - the number of bytes there were writtenIOException - thrown if an error occursCopyright © 2014 JBoss by Red Hat. All rights reserved.