public class ChunkedStreamSinkConduit
extends org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
| Modifier and Type | Field and Description |
|---|---|
static byte[] |
CRLF |
static AttachmentKey<HeaderMap> |
TRAILERS
Trails that are to be attached to the end of the HTTP response.
|
| Constructor and Description |
|---|
ChunkedStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next,
boolean configurable,
boolean passClose,
ConduitListener<? super ChunkedStreamSinkConduit> finishListener,
Attachable attachable)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
awaitWritable() |
void |
awaitWritable(long time,
TimeUnit timeUnit) |
boolean |
flush() |
void |
terminateWrites() |
long |
transferFrom(FileChannel src,
long position,
long count) |
long |
transferFrom(org.xnio.channels.StreamSourceChannel source,
long count,
ByteBuffer throughBuffer) |
int |
write(ByteBuffer src) |
long |
write(ByteBuffer[] srcs,
int offset,
int length) |
getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, truncateWrites, wakeupWritesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static final AttachmentKey<HeaderMap> TRAILERS
terminateWrites() method is called.public static final byte[] CRLF
public ChunkedStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next,
boolean configurable,
boolean passClose,
ConduitListener<? super ChunkedStreamSinkConduit> finishListener,
Attachable attachable)
next - the channel to wrapconfigurable - true to allow configuration of the next channel, false otherwisepassClose - true to close the underlying channel when this channel is closed, false otherwisefinishListener - attachable - public int write(ByteBuffer src) throws IOException
write in interface org.xnio.conduits.StreamSinkConduitwrite in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>IOExceptionpublic long write(ByteBuffer[] srcs, int offset, int length) throws IOException
write in interface org.xnio.conduits.StreamSinkConduitwrite in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>IOExceptionpublic long transferFrom(FileChannel src, long position, long count) throws IOException
transferFrom in interface org.xnio.conduits.StreamSinkConduittransferFrom in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>IOExceptionpublic long transferFrom(org.xnio.channels.StreamSourceChannel source,
long count,
ByteBuffer throughBuffer)
throws IOException
transferFrom in interface org.xnio.conduits.StreamSinkConduittransferFrom in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>IOExceptionpublic boolean flush()
throws IOException
flush in interface org.xnio.conduits.SinkConduitflush in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>IOExceptionpublic void terminateWrites()
throws IOException
terminateWrites in interface org.xnio.conduits.SinkConduitterminateWrites in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>IOExceptionpublic void awaitWritable()
throws IOException
awaitWritable in interface org.xnio.conduits.SinkConduitawaitWritable in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>IOExceptionpublic void awaitWritable(long time,
TimeUnit timeUnit)
throws IOException
awaitWritable in interface org.xnio.conduits.SinkConduitawaitWritable in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>IOExceptionCopyright © 2013 JBoss by Red Hat. All Rights Reserved.