| java.lang.Object org.apache.coyote.http11.filters.ChunkedInputFilter
Field Summary | |
final protected static ByteChunk | ENCODING | final protected static String | ENCODING_NAME | 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 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 | |
public int | available() Amount of bytes still available in a buffer. | public int | doRead(ByteChunk chunk, Request req) Read bytes.
If the filter does request length control, this value issignificant; 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. | public long | end() End the current request. | public ByteChunk | getEncodingName() Return the name of the associated encoding; Here, the value is
"identity". | protected boolean | parseCRLF() Parse CRLF at end of chunk. | protected boolean | parseChunkHeader() Parse the header of a chunk. | protected boolean | parseEndChunk() Parse end chunk data. | protected int | readBytes() Read bytes from the previous buffer. | public void | recycle() Make the filter ready to process the next request. | public void | setBuffer(InputBuffer buffer) Set the next buffer in the filter pipeline. | public void | setRequest(Request request) Read the content length from the request. |
ENCODING_NAME | final protected static String ENCODING_NAME(Code) | | |
buf | protected byte[] buf(Code) | | Read bytes buffer.
|
endChunk | protected boolean endChunk(Code) | | Flag set to true when the end chunk has been read.
|
lastValid | protected int lastValid(Code) | | Last valid byte in the buffer.
|
needCRLFParse | protected boolean needCRLFParse(Code) | | Flag set to true if the next call to doRead() must parse a CRLF pair
before doing anything else.
|
pos | protected int pos(Code) | | Position in the buffer.
|
readChunk | protected ByteChunk readChunk(Code) | | Byte chunk used to read bytes.
|
remaining | protected int remaining(Code) | | Number of bytes remaining in the current chunk.
|
available | public int available()(Code) | | Amount of bytes still available in a buffer.
|
doRead | public int doRead(ByteChunk chunk, Request req) throws IOException(Code) | | Read bytes.
If the filter does request length control, this value issignificant; 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 lengthcontrol, the returned value should be -1. |
getEncodingName | public ByteChunk getEncodingName()(Code) | | Return the name of the associated encoding; Here, the value is
"identity".
|
parseCRLF | protected boolean parseCRLF() throws IOException(Code) | | Parse CRLF at end of chunk.
|
parseChunkHeader | protected boolean parseChunkHeader() throws IOException(Code) | | Parse the header of a chunk.
A chunk header can look like
A10CRLF
F23;chunk-extension to be ignoredCRLF
The letters before CRLF but after the trailer mark, must be valid hex digits,
we should not parse F23IAMGONNAMESSTHISUP34CRLF as a valid header
according to spec
|
parseEndChunk | protected boolean parseEndChunk() throws IOException(Code) | | Parse end chunk data.
FIXME: Handle trailers
|
readBytes | protected int readBytes() throws IOException(Code) | | Read bytes from the previous buffer.
|
recycle | public void recycle()(Code) | | Make the filter ready to process the next request.
|
setBuffer | public void setBuffer(InputBuffer buffer)(Code) | | Set the next buffer in the filter pipeline.
|
setRequest | public void setRequest(Request request)(Code) | | Read the content length from the request.
|
|
|