public class ChunkedStreamSourceConduit extends AbstractStreamSourceConduit<StreamSourceConduit>
Modifier and Type | Field and Description |
---|---|
static AttachmentKey<HeaderMap> |
TRAILERS
Deprecated.
|
next
Modifier | Constructor and Description |
---|---|
protected |
ChunkedStreamSourceConduit(StreamSourceConduit next,
io.undertow.conduits.ChunkedStreamSourceConduit.BufferWrapper bufferWrapper,
ConduitListener<? super ChunkedStreamSourceConduit> finishListener,
Attachable attachable,
HttpServerExchange exchange,
Closeable closeable) |
|
ChunkedStreamSourceConduit(StreamSourceConduit next,
HttpServerExchange exchange,
ConduitListener<? super ChunkedStreamSourceConduit> finishListener) |
|
ChunkedStreamSourceConduit(StreamSourceConduit next,
PushBackStreamSourceConduit channel,
ByteBufferPool pool,
ConduitListener<? super ChunkedStreamSourceConduit> finishListener,
Attachable attachable,
Closeable closeable) |
Modifier and Type | Method and Description |
---|---|
boolean |
isFinished() |
int |
read(ByteBuffer dst)
Read a sequence of bytes from this conduit to the given buffer.
|
long |
read(ByteBuffer[] dsts,
int offset,
int length)
Read a sequence of bytes from this conduit to the given buffers.
|
void |
terminateReads()
Indicate that no more data will be read from this conduit.
|
long |
transferTo(long count,
ByteBuffer throughBuffer,
StreamSinkChannel target)
Transfers bytes into the given channel target.
|
long |
transferTo(long position,
long count,
FileChannel target)
Transfers bytes into the given file from this channel.
|
awaitReadable, awaitReadable, getReadThread, isReadResumed, isReadShutdown, resumeReads, setReadReadyHandler, suspendReads, wakeupReads
getWorker
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
awaitReadable, awaitReadable, getReadThread, isReadResumed, isReadShutdown, resumeReads, setReadReadyHandler, suspendReads, wakeupReads
@Deprecated public static final AttachmentKey<HeaderMap> TRAILERS
public ChunkedStreamSourceConduit(StreamSourceConduit next, PushBackStreamSourceConduit channel, ByteBufferPool pool, ConduitListener<? super ChunkedStreamSourceConduit> finishListener, Attachable attachable, Closeable closeable)
public ChunkedStreamSourceConduit(StreamSourceConduit next, HttpServerExchange exchange, ConduitListener<? super ChunkedStreamSourceConduit> finishListener)
protected ChunkedStreamSourceConduit(StreamSourceConduit next, io.undertow.conduits.ChunkedStreamSourceConduit.BufferWrapper bufferWrapper, ConduitListener<? super ChunkedStreamSourceConduit> finishListener, Attachable attachable, HttpServerExchange exchange, Closeable closeable)
public long transferTo(long position, long count, FileChannel target) throws IOException
StreamSourceConduit
transferTo
in interface StreamSourceConduit
transferTo
in class AbstractStreamSourceConduit<StreamSourceConduit>
position
- the position within the file from which the transfer is to begincount
- the number of bytes to be transferredtarget
- the file to write toIOException
- if an I/O error occurspublic long transferTo(long count, ByteBuffer throughBuffer, StreamSinkChannel target) throws IOException
StreamSourceConduit
throughBuffer
will be cleared. On exit, the buffer will be
flipped for emptying, and may possibly be empty or may contain data. If this method returns a value less than
count
, then the remaining data in throughBuffer
may contain data read from this channel which must
be written to target
to complete the operation.transferTo
in interface StreamSourceConduit
transferTo
in class AbstractStreamSourceConduit<StreamSourceConduit>
count
- the number of bytes to be transferredthroughBuffer
- the buffer to copy through.target
- the destination to write toIOException
- if an I/O error occurspublic long read(ByteBuffer[] dsts, int offset, int length) throws IOException
StreamSourceConduit
read
in interface StreamSourceConduit
read
in class AbstractStreamSourceConduit<StreamSourceConduit>
offset
- the offset into the buffer arraylength
- the number of buffers to fillSourceConduit.terminateReads()
method was previously calledIOException
- if an error occurspublic void terminateReads() throws IOException
SourceConduit
terminateReads
in interface SourceConduit
terminateReads
in class AbstractSourceConduit<StreamSourceConduit>
IOException
- if there was a problempublic int read(ByteBuffer dst) throws IOException
StreamSourceConduit
read
in interface StreamSourceConduit
read
in class AbstractStreamSourceConduit<StreamSourceConduit>
SourceConduit.terminateReads()
method was previously calledIOException
- if an error occurspublic boolean isFinished()
Copyright © 2017 JBoss by Red Hat. All rights reserved.