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
FieldsModifier and TypeFieldDescriptionstatic final ConduitWrapper<org.xnio.conduits.StreamSourceConduit>Fields inherited from class org.xnio.conduits.AbstractConduit
next -
Constructor Summary
ConstructorsConstructorDescriptionInflatingStreamSourceConduit(HttpServerExchange exchange, org.xnio.conduits.StreamSourceConduit next) InflatingStreamSourceConduit(HttpServerExchange exchange, org.xnio.conduits.StreamSourceConduit next, ObjectPool<Inflater> inflaterPool) InflatingStreamSourceConduit(HttpServerExchange exchange, org.xnio.conduits.StreamSourceConduit next, ObjectPool<Inflater> inflaterPool, ObjectPool<Inflater> inflaterWrappingPool) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddataDeflated(byte[] data, int off, int len) protected voidprotected booleanstatic ObjectPool<Inflater>Create non-wrapping(gzip/zlib without headers) inflater poolstatic ObjectPool<Inflater>Create wrapping inflater pool, one that expects headers.intread(ByteBuffer dst) longread(ByteBuffer[] dsts, int offset, int length) protected voidreadFooter(ByteBuffer buf) protected booleanreadHeader(ByteBuffer byteBuffer) static ObjectPool<Inflater>simpleInflaterPool(int poolSize) Create non-wrapping(gzip/zlib without headers) inflater poolstatic ObjectPool<Inflater>simpleWrappingInflaterPool(int poolSize) Create wrapping inflater pool, one that expects headers.voidlongtransferTo(long position, long count, FileChannel target) longtransferTo(long count, ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target) Methods inherited from class org.xnio.conduits.AbstractSourceConduit
awaitReadable, awaitReadable, getReadThread, isReadResumed, isReadShutdown, resumeReads, setReadReadyHandler, suspendReads, wakeupReadsMethods inherited from class org.xnio.conduits.AbstractConduit
getWorkerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xnio.conduits.Conduit
getWorkerMethods inherited from interface org.xnio.conduits.SourceConduit
awaitReadable, awaitReadable, getReadThread, isReadResumed, isReadShutdown, resumeReads, setReadReadyHandler, suspendReads, wakeupReads
-
Field Details
-
WRAPPER
-
-
Constructor Details
-
InflatingStreamSourceConduit
public InflatingStreamSourceConduit(HttpServerExchange exchange, org.xnio.conduits.StreamSourceConduit next) -
InflatingStreamSourceConduit
public InflatingStreamSourceConduit(HttpServerExchange exchange, org.xnio.conduits.StreamSourceConduit next, ObjectPool<Inflater> inflaterPool) -
InflatingStreamSourceConduit
public InflatingStreamSourceConduit(HttpServerExchange exchange, org.xnio.conduits.StreamSourceConduit next, ObjectPool<Inflater> inflaterPool, ObjectPool<Inflater> inflaterWrappingPool)
-
-
Method Details
-
newInstanceInflaterPool
Create non-wrapping(gzip/zlib without headers) inflater pool- Returns:
-
simpleInflaterPool
Create non-wrapping(gzip/zlib without headers) inflater pool- Returns:
-
newInstanceWrappingInflaterPool
Create wrapping inflater pool, one that expects headers.- Returns:
-
simpleWrappingInflaterPool
Create wrapping inflater pool, one that expects headers.- Returns:
-
read
- Specified by:
readin interfaceorg.xnio.conduits.StreamSourceConduit- Overrides:
readin classorg.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>- Throws:
IOException
-
initializeInflater
- Throws:
IOException
-
isZlibHeaderPresent
- Throws:
IOException
-
readHeader
- Throws:
IOException
-
dataDeflated
protected void dataDeflated(byte[] data, int off, int len) -
transferTo
- Specified by:
transferToin interfaceorg.xnio.conduits.StreamSourceConduit- Overrides:
transferToin classorg.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>- Throws:
IOException
-
transferTo
public long transferTo(long count, ByteBuffer throughBuffer, org.xnio.channels.StreamSinkChannel target) throws IOException - Specified by:
transferToin interfaceorg.xnio.conduits.StreamSourceConduit- Overrides:
transferToin classorg.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>- Throws:
IOException
-
read
- Specified by:
readin interfaceorg.xnio.conduits.StreamSourceConduit- Overrides:
readin classorg.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>- Throws:
IOException
-
terminateReads
- Specified by:
terminateReadsin interfaceorg.xnio.conduits.SourceConduit- Overrides:
terminateReadsin classorg.xnio.conduits.AbstractSourceConduit<org.xnio.conduits.StreamSourceConduit>- Throws:
IOException
-