org.xnio.conduits.Conduit, org.xnio.conduits.SinkConduit, org.xnio.conduits.StreamSinkConduitpublic class ChunkedStreamSinkConduit
extends org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>
| Modifier and Type | Field | Description |
|---|---|---|
static AttachmentKey<HeaderMap> |
TRAILERS |
Deprecated.
|
| Constructor | Description |
|---|---|
ChunkedStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next,
ByteBufferPool bufferPool,
boolean configurable,
boolean passClose,
HeaderMap responseHeaders,
ConduitListener<? super ChunkedStreamSinkConduit> finishListener,
Attachable attachable) |
Construct a new instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
awaitWritable() |
|
void |
awaitWritable(long time,
java.util.concurrent.TimeUnit timeUnit) |
|
boolean |
flush() |
|
void |
terminateWrites() |
|
long |
transferFrom(java.nio.channels.FileChannel src,
long position,
long count) |
|
long |
transferFrom(org.xnio.channels.StreamSourceChannel source,
long count,
java.nio.ByteBuffer throughBuffer) |
|
void |
truncateWrites() |
|
int |
write(java.nio.ByteBuffer src) |
|
long |
write(java.nio.ByteBuffer[] srcs,
int offset,
int length) |
|
int |
writeFinal(java.nio.ByteBuffer src) |
|
long |
writeFinal(java.nio.ByteBuffer[] srcs,
int offset,
int length) |
getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, wakeupWrites@Deprecated public static final AttachmentKey<HeaderMap> TRAILERS
This attachment must be set before the terminateWrites() method is called.
public ChunkedStreamSinkConduit(org.xnio.conduits.StreamSinkConduit next,
ByteBufferPool bufferPool,
boolean configurable,
boolean passClose,
HeaderMap responseHeaders,
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 otherwiseresponseHeaders - The response headersfinishListener - The finish listenerattachable - The attachablepublic int write(java.nio.ByteBuffer src)
throws java.io.IOException
write in interface org.xnio.conduits.StreamSinkConduitwrite in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic void truncateWrites()
throws java.io.IOException
truncateWrites in interface org.xnio.conduits.SinkConduittruncateWrites in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic long write(java.nio.ByteBuffer[] srcs,
int offset,
int length)
throws java.io.IOException
write in interface org.xnio.conduits.StreamSinkConduitwrite in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic long writeFinal(java.nio.ByteBuffer[] srcs,
int offset,
int length)
throws java.io.IOException
writeFinal in interface org.xnio.conduits.StreamSinkConduitwriteFinal in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic int writeFinal(java.nio.ByteBuffer src)
throws java.io.IOException
writeFinal in interface org.xnio.conduits.StreamSinkConduitwriteFinal in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic long transferFrom(java.nio.channels.FileChannel src,
long position,
long count)
throws java.io.IOException
transferFrom in interface org.xnio.conduits.StreamSinkConduittransferFrom in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic long transferFrom(org.xnio.channels.StreamSourceChannel source,
long count,
java.nio.ByteBuffer throughBuffer)
throws java.io.IOException
transferFrom in interface org.xnio.conduits.StreamSinkConduittransferFrom in class org.xnio.conduits.AbstractStreamSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic boolean flush()
throws java.io.IOException
flush in interface org.xnio.conduits.SinkConduitflush in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic void terminateWrites()
throws java.io.IOException
terminateWrites in interface org.xnio.conduits.SinkConduitterminateWrites in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic void awaitWritable()
throws java.io.IOException
awaitWritable in interface org.xnio.conduits.SinkConduitawaitWritable in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionpublic void awaitWritable(long time,
java.util.concurrent.TimeUnit timeUnit)
throws java.io.IOException
awaitWritable in interface org.xnio.conduits.SinkConduitawaitWritable in class org.xnio.conduits.AbstractSinkConduit<org.xnio.conduits.StreamSinkConduit>java.io.IOExceptionCopyright © 2018. All rights reserved.