Package io.undertow.conduits
Class InflatingStreamSourceConduit
- java.lang.Object
-
- org.xnio.conduits.AbstractConduit<D>
-
- org.xnio.conduits.AbstractSourceConduit<D>
-
- org.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>
-
- io.undertow.conduits.InflatingStreamSourceConduit
-
- All Implemented Interfaces:
org.xnio.conduits.Conduit,org.xnio.conduits.SourceConduit,org.xnio.conduits.StreamSourceConduit
- Direct Known Subclasses:
GzipStreamSourceConduit
public class InflatingStreamSourceConduit extends org.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>- Author:
- Stuart Douglas
-
-
Field Summary
Fields Modifier and Type Field Description static ConduitWrapper<org.xnio.conduits.StreamSourceConduit>WRAPPER
-
Constructor Summary
Constructors Constructor Description InflatingStreamSourceConduit(HttpServerExchange exchange, org.xnio.conduits.StreamSourceConduit next)InflatingStreamSourceConduit(HttpServerExchange exchange, org.xnio.conduits.StreamSourceConduit next, ObjectPool<java.util.zip.Inflater> inflaterPool)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddataDeflated(byte[] data, int off, int len)static ObjectPool<java.util.zip.Inflater>newInstanceInflaterPool()intread(java.nio.ByteBuffer dst)longread(java.nio.ByteBuffer[] dsts, int offset, int length)protected voidreadFooter(java.nio.ByteBuffer buf)protected booleanreadHeader(java.nio.ByteBuffer byteBuffer)static ObjectPool<java.util.zip.Inflater>simpleInflaterPool(int poolSize)voidterminateReads()longtransferTo(long position, long count, java.nio.channels.FileChannel target)longtransferTo(long count, java.nio.ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target)-
Methods inherited from class org.xnio.conduits.AbstractSourceConduit
awaitReadable, awaitReadable, getReadThread, isReadResumed, isReadShutdown, resumeReads, setReadReadyHandler, suspendReads, wakeupReads
-
-
-
-
Field Detail
-
WRAPPER
public static final ConduitWrapper<org.xnio.conduits.StreamSourceConduit> WRAPPER
-
-
Constructor Detail
-
InflatingStreamSourceConduit
public InflatingStreamSourceConduit(HttpServerExchange exchange, org.xnio.conduits.StreamSourceConduit next)
-
InflatingStreamSourceConduit
public InflatingStreamSourceConduit(HttpServerExchange exchange, org.xnio.conduits.StreamSourceConduit next, ObjectPool<java.util.zip.Inflater> inflaterPool)
-
-
Method Detail
-
newInstanceInflaterPool
public static ObjectPool<java.util.zip.Inflater> newInstanceInflaterPool()
-
simpleInflaterPool
public static ObjectPool<java.util.zip.Inflater> simpleInflaterPool(int poolSize)
-
read
public int read(java.nio.ByteBuffer dst) throws java.io.IOException- Specified by:
readin interfaceorg.xnio.conduits.StreamSourceConduit- Overrides:
readin classorg.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>- Throws:
java.io.IOException
-
readFooter
protected void readFooter(java.nio.ByteBuffer buf) throws java.io.IOException- Throws:
java.io.IOException
-
readHeader
protected boolean readHeader(java.nio.ByteBuffer byteBuffer) throws java.io.IOException- Throws:
java.io.IOException
-
dataDeflated
protected void dataDeflated(byte[] data, int off, int len)
-
transferTo
public long transferTo(long position, long count, java.nio.channels.FileChannel target) throws java.io.IOException- Specified by:
transferToin interfaceorg.xnio.conduits.StreamSourceConduit- Overrides:
transferToin classorg.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>- Throws:
java.io.IOException
-
transferTo
public long transferTo(long count, java.nio.ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target) throws java.io.IOException- Specified by:
transferToin interfaceorg.xnio.conduits.StreamSourceConduit- Overrides:
transferToin classorg.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>- Throws:
java.io.IOException
-
read
public long read(java.nio.ByteBuffer[] dsts, int offset, int length) throws java.io.IOException- Specified by:
readin interfaceorg.xnio.conduits.StreamSourceConduit- Overrides:
readin classorg.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>- Throws:
java.io.IOException
-
terminateReads
public void terminateReads() throws java.io.IOException- Specified by:
terminateReadsin interfaceorg.xnio.conduits.SourceConduit- Overrides:
terminateReadsin classorg.xnio.conduits.AbstractSourceConduit<org.xnio.conduits.StreamSourceConduit>- Throws:
java.io.IOException
-
-