public class ChunkDecoder extends AbstractContentDecoder
Modifier and Type | Field and Description |
---|---|
private long |
chunkSize |
private static int |
COMPLETED |
private MessageConstraints |
constraints |
private boolean |
endOfChunk |
private boolean |
endOfStream |
private Header[] |
footers |
private CharArrayBuffer |
lineBuf |
private long |
pos |
private static int |
READ_CONTENT |
private static int |
READ_FOOTERS |
private int |
state |
private List<CharArrayBuffer> |
trailerBufs |
buffer, channel, completed, metrics
Constructor and Description |
---|
ChunkDecoder(ReadableByteChannel channel,
SessionInputBuffer buffer,
HttpTransportMetricsImpl metrics) |
ChunkDecoder(ReadableByteChannel channel,
SessionInputBuffer buffer,
MessageConstraints constraints,
HttpTransportMetricsImpl metrics) |
Modifier and Type | Method and Description |
---|---|
Header[] |
getFooters() |
private void |
parseHeader() |
private void |
processFooters() |
int |
read(ByteBuffer dst)
Reads a portion of content from the underlying channel
|
private void |
readChunkHead() |
String |
toString() |
fillBufferFromChannel, isCompleted, readFromChannel, readFromChannel
private static final int READ_CONTENT
private static final int READ_FOOTERS
private static final int COMPLETED
private int state
private boolean endOfChunk
private boolean endOfStream
private CharArrayBuffer lineBuf
private long chunkSize
private long pos
private final MessageConstraints constraints
private final List<CharArrayBuffer> trailerBufs
public ChunkDecoder(ReadableByteChannel channel, SessionInputBuffer buffer, MessageConstraints constraints, HttpTransportMetricsImpl metrics)
public ChunkDecoder(ReadableByteChannel channel, SessionInputBuffer buffer, HttpTransportMetricsImpl metrics)
private void readChunkHead() throws IOException
IOException
private void parseHeader() throws IOException
IOException
private void processFooters() throws IOException
IOException
public int read(ByteBuffer dst) throws IOException
ContentDecoder
dst
- The buffer into which entity content is to be transferredIOException
- if I/O error occurs while reading contentpublic Header[] getFooters()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses