org.apache.coyote.http11.filters
public class ChunkedInputFilter extends Object implements InputFilter
Field Summary | |
---|---|
protected byte[] | buf
Read bytes buffer. |
protected InputBuffer | buffer
Next buffer in the pipeline. |
protected boolean | endChunk
Flag set to true when the end chunk has been read. |
protected static ByteChunk | ENCODING |
protected static String | ENCODING_NAME |
protected int | lastValid
Last valid byte in the buffer. |
protected boolean | needCRLFParse
Flag set to true if the next call to doRead() must parse a CRLF pair
before doing anything else. |
protected int | pos
Position in the buffer. |
protected ByteChunk | readChunk
Byte chunk used to read bytes. |
protected int | remaining
Number of bytes remaining in the current chunk. |
Method Summary | |
---|---|
int | available()
Amount of bytes still available in a buffer. |
int | doRead(ByteChunk chunk, Request req)
Read bytes.
|
long | end()
End the current request. |
ByteChunk | getEncodingName()
Return the name of the associated encoding; Here, the value is
"identity". |
protected boolean | parseChunkHeader()
Parse the header of a chunk.
|
protected boolean | parseCRLF()
Parse CRLF at end of chunk. |
protected boolean | parseEndChunk()
Parse end chunk data.
|
protected int | readBytes()
Read bytes from the previous buffer. |
void | recycle()
Make the filter ready to process the next request. |
void | setBuffer(InputBuffer buffer)
Set the next buffer in the filter pipeline. |
void | setRequest(Request request)
Read the content length from the request. |
Returns: If the filter does request length control, this value is significant; it should be the number of bytes consumed from the buffer, up until the end of the current request body, or the buffer length, whichever is greater. If the filter does not do request body length control, the returned value should be -1.