public class DeflatingStreamSinkConduit extends Object implements org.xnio.conduits.StreamSinkConduit
| Modifier and Type | Field and Description |
|---|---|
protected PooledByteBuffer | currentBuffer The streams buffer. |
protected Deflater | deflater |
protected PooledObject<Deflater> | pooledObject |
| Constructor and Description |
|---|
DeflatingStreamSinkConduit(ConduitFactory<org.xnio.conduits.StreamSinkConduit> conduitFactory, HttpServerExchange exchange) |
DeflatingStreamSinkConduit(ConduitFactory<org.xnio.conduits.StreamSinkConduit> conduitFactory, HttpServerExchange exchange, int deflateLevel) |
DeflatingStreamSinkConduit(ConduitFactory<org.xnio.conduits.StreamSinkConduit> conduitFactory, HttpServerExchange exchange, ObjectPool<Deflater> deflaterPool) |
| Modifier and Type | Method and Description |
|---|---|
void | awaitWritable() |
void | awaitWritable(long time, TimeUnit timeUnit) |
boolean | flush() |
protected byte[] | getTrailer() called before the stream is finally flushed. |
org.xnio.XnioWorker | getWorker() |
org.xnio.XnioIoThread | getWriteThread() |
boolean | isWriteResumed() |
boolean | isWriteShutdown() |
static ObjectPool<Deflater> | newInstanceDeflaterPool(int deflateLevel) |
protected void | preDeflate(byte[] data) |
void | resumeWrites() |
void | setWriteReadyHandler(org.xnio.conduits.WriteReadyHandler handler) |
static ObjectPool<Deflater> | simpleDeflaterPool(int poolSize, int deflateLevel) |
void | suspendWrites() |
void | terminateWrites() |
long | transferFrom(FileChannel src, long position, long count) |
long | transferFrom(org.xnio.channels.StreamSourceChannel source, long count, ByteBuffer throughBuffer) |
void | truncateWrites() |
void | wakeupWrites() |
int | write(ByteBuffer src) |
long | write(ByteBuffer[] srcs, int offset, int length) |
int | writeFinal(ByteBuffer src) |
long | writeFinal(ByteBuffer[] srcs, int offset, int length) |
protected volatile Deflater deflater
protected final PooledObject<Deflater> pooledObject
protected PooledByteBuffer currentBuffer
public DeflatingStreamSinkConduit(ConduitFactory<org.xnio.conduits.StreamSinkConduit> conduitFactory, HttpServerExchange exchange)
public DeflatingStreamSinkConduit(ConduitFactory<org.xnio.conduits.StreamSinkConduit> conduitFactory, HttpServerExchange exchange, int deflateLevel)
public DeflatingStreamSinkConduit(ConduitFactory<org.xnio.conduits.StreamSinkConduit> conduitFactory, HttpServerExchange exchange, ObjectPool<Deflater> deflaterPool)
public static ObjectPool<Deflater> newInstanceDeflaterPool(int deflateLevel)
public static ObjectPool<Deflater> simpleDeflaterPool(int poolSize, int deflateLevel)
public int write(ByteBuffer src) throws IOException
write in interface org.xnio.conduits.StreamSinkConduitIOExceptionprotected void preDeflate(byte[] data)
public long write(ByteBuffer[] srcs, int offset, int length) throws IOException
write in interface org.xnio.conduits.StreamSinkConduitIOExceptionpublic int writeFinal(ByteBuffer src) throws IOException
writeFinal in interface org.xnio.conduits.StreamSinkConduitIOExceptionpublic long writeFinal(ByteBuffer[] srcs, int offset, int length) throws IOException
writeFinal in interface org.xnio.conduits.StreamSinkConduitIOExceptionpublic long transferFrom(FileChannel src, long position, long count) throws IOException
transferFrom in interface org.xnio.conduits.StreamSinkConduitIOExceptionpublic long transferFrom(org.xnio.channels.StreamSourceChannel source,
long count,
ByteBuffer throughBuffer)
throws IOException transferFrom in interface org.xnio.conduits.StreamSinkConduitIOExceptionpublic org.xnio.XnioWorker getWorker()
getWorker in interface org.xnio.conduits.Conduitpublic void suspendWrites()
suspendWrites in interface org.xnio.conduits.SinkConduitpublic boolean isWriteResumed()
isWriteResumed in interface org.xnio.conduits.SinkConduitpublic void wakeupWrites()
wakeupWrites in interface org.xnio.conduits.SinkConduitpublic void resumeWrites()
resumeWrites in interface org.xnio.conduits.SinkConduitpublic void terminateWrites()
throws IOException terminateWrites in interface org.xnio.conduits.SinkConduitIOExceptionpublic boolean isWriteShutdown()
isWriteShutdown in interface org.xnio.conduits.SinkConduitpublic void awaitWritable()
throws IOException awaitWritable in interface org.xnio.conduits.SinkConduitIOExceptionpublic void awaitWritable(long time,
TimeUnit timeUnit)
throws IOException awaitWritable in interface org.xnio.conduits.SinkConduitIOExceptionpublic org.xnio.XnioIoThread getWriteThread()
getWriteThread in interface org.xnio.conduits.SinkConduitpublic void setWriteReadyHandler(org.xnio.conduits.WriteReadyHandler handler)
setWriteReadyHandler in interface org.xnio.conduits.SinkConduitpublic boolean flush()
throws IOException flush in interface org.xnio.conduits.SinkConduitIOExceptionprotected byte[] getTrailer()
public void truncateWrites()
throws IOException truncateWrites in interface org.xnio.conduits.SinkConduitIOExceptionCopyright © 2020 JBoss by Red Hat. All rights reserved.