Package io.undertow.conduits
Class ChunkedStreamSourceConduit
- java.lang.Object
-
- org.xnio.conduits.AbstractConduit<D>
-
- org.xnio.conduits.AbstractSourceConduit<D>
-
- org.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>
-
- io.undertow.conduits.ChunkedStreamSourceConduit
-
- All Implemented Interfaces:
org.xnio.conduits.Conduit
,org.xnio.conduits.SourceConduit
,org.xnio.conduits.StreamSourceConduit
public class ChunkedStreamSourceConduit extends org.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>
Channel to de-chunkify data- Author:
- Stuart Douglas
-
-
Field Summary
Fields Modifier and Type Field Description static AttachmentKey<HeaderMap>
TRAILERS
Deprecated.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ChunkedStreamSourceConduit(org.xnio.conduits.StreamSourceConduit next, io.undertow.conduits.ChunkedStreamSourceConduit.BufferWrapper bufferWrapper, ConduitListener<? super ChunkedStreamSourceConduit> finishListener, Attachable attachable, HttpServerExchange exchange, java.io.Closeable closeable)
ChunkedStreamSourceConduit(org.xnio.conduits.StreamSourceConduit next, HttpServerExchange exchange, ConduitListener<? super ChunkedStreamSourceConduit> finishListener)
ChunkedStreamSourceConduit(org.xnio.conduits.StreamSourceConduit next, org.xnio.conduits.PushBackStreamSourceConduit channel, ByteBufferPool pool, ConduitListener<? super ChunkedStreamSourceConduit> finishListener, Attachable attachable, java.io.Closeable closeable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isFinished()
int
read(java.nio.ByteBuffer dst)
long
read(java.nio.ByteBuffer[] dsts, int offset, int length)
void
terminateReads()
long
transferTo(long position, long count, java.nio.channels.FileChannel target)
long
transferTo(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
-
TRAILERS
@Deprecated public static final AttachmentKey<HeaderMap> TRAILERS
Deprecated.If the response has HTTP footers they are attached to the exchange under this key. They will only be available once the exchange has been fully read.
-
-
Constructor Detail
-
ChunkedStreamSourceConduit
public ChunkedStreamSourceConduit(org.xnio.conduits.StreamSourceConduit next, org.xnio.conduits.PushBackStreamSourceConduit channel, ByteBufferPool pool, ConduitListener<? super ChunkedStreamSourceConduit> finishListener, Attachable attachable, java.io.Closeable closeable)
-
ChunkedStreamSourceConduit
public ChunkedStreamSourceConduit(org.xnio.conduits.StreamSourceConduit next, HttpServerExchange exchange, ConduitListener<? super ChunkedStreamSourceConduit> finishListener)
-
ChunkedStreamSourceConduit
protected ChunkedStreamSourceConduit(org.xnio.conduits.StreamSourceConduit next, io.undertow.conduits.ChunkedStreamSourceConduit.BufferWrapper bufferWrapper, ConduitListener<? super ChunkedStreamSourceConduit> finishListener, Attachable attachable, HttpServerExchange exchange, java.io.Closeable closeable)
-
-
Method Detail
-
transferTo
public long transferTo(long position, long count, java.nio.channels.FileChannel target) throws java.io.IOException
- Specified by:
transferTo
in interfaceorg.xnio.conduits.StreamSourceConduit
- Overrides:
transferTo
in 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:
transferTo
in interfaceorg.xnio.conduits.StreamSourceConduit
- Overrides:
transferTo
in 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:
read
in interfaceorg.xnio.conduits.StreamSourceConduit
- Overrides:
read
in classorg.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>
- Throws:
java.io.IOException
-
terminateReads
public void terminateReads() throws java.io.IOException
- Specified by:
terminateReads
in interfaceorg.xnio.conduits.SourceConduit
- Overrides:
terminateReads
in classorg.xnio.conduits.AbstractSourceConduit<org.xnio.conduits.StreamSourceConduit>
- Throws:
java.io.IOException
-
read
public int read(java.nio.ByteBuffer dst) throws java.io.IOException
- Specified by:
read
in interfaceorg.xnio.conduits.StreamSourceConduit
- Overrides:
read
in classorg.xnio.conduits.AbstractStreamSourceConduit<org.xnio.conduits.StreamSourceConduit>
- Throws:
java.io.IOException
-
isFinished
public boolean isFinished()
-
-