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 java.util.List<CharArrayBuffer> |
trailerBufs |
buffer, channel, completed, metrics| Constructor and Description |
|---|
ChunkDecoder(java.nio.channels.ReadableByteChannel channel,
SessionInputBuffer buffer,
HttpTransportMetricsImpl metrics) |
ChunkDecoder(java.nio.channels.ReadableByteChannel channel,
SessionInputBuffer buffer,
MessageConstraints constraints,
HttpTransportMetricsImpl metrics) |
| Modifier and Type | Method and Description |
|---|---|
Header[] |
getFooters() |
private void |
parseHeader() |
private void |
processFooters() |
int |
read(java.nio.ByteBuffer dst)
Reads a portion of content from the underlying channel
|
private void |
readChunkHead() |
java.lang.String |
toString() |
fillBufferFromChannel, isCompleted, readFromChannel, readFromChannelprivate 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 java.util.List<CharArrayBuffer> trailerBufs
private Header[] footers
public ChunkDecoder(java.nio.channels.ReadableByteChannel channel,
SessionInputBuffer buffer,
MessageConstraints constraints,
HttpTransportMetricsImpl metrics)
public ChunkDecoder(java.nio.channels.ReadableByteChannel channel,
SessionInputBuffer buffer,
HttpTransportMetricsImpl metrics)
private void readChunkHead()
throws java.io.IOException
java.io.IOExceptionprivate void parseHeader()
throws java.io.IOException
java.io.IOExceptionprivate void processFooters()
throws java.io.IOException
java.io.IOExceptionpublic int read(java.nio.ByteBuffer dst)
throws java.io.IOException
ContentDecoderdst - The buffer into which entity content is to be transferredjava.io.IOException - if I/O error occurs while reading contentpublic Header[] getFooters()
public java.lang.String toString()
toString in class java.lang.Object