|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.coyote.http11.filters.ChunkedInputFilter
public class ChunkedInputFilter
Chunked input filter. Parses chunked data according to
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1
Field Summary | |
---|---|
protected byte[] |
buf
Read bytes buffer. |
protected InputBuffer |
buffer
Next buffer in the pipeline. |
protected static ByteChunk |
ENCODING
|
protected static java.lang.String |
ENCODING_NAME
|
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. |
protected ByteChunk |
trailingHeaders
Byte chunk used to store trailing headers. |
Constructor Summary | |
---|---|
ChunkedInputFilter()
|
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()
Deprecated. Use parseCRLF(boolean) |
protected void |
parseCRLF(boolean tolerant)
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String ENCODING_NAME
protected static final ByteChunk ENCODING
protected InputBuffer buffer
protected int remaining
protected int pos
protected int lastValid
protected byte[] buf
protected ByteChunk readChunk
protected boolean endChunk
protected ByteChunk trailingHeaders
protected boolean needCRLFParse
Constructor Detail |
---|
public ChunkedInputFilter()
Method Detail |
---|
public int doRead(ByteChunk chunk, Request req) throws java.io.IOException
doRead
in interface InputFilter
doRead
in interface InputBuffer
java.io.IOException
public void setRequest(Request request)
setRequest
in interface InputFilter
public long end() throws java.io.IOException
end
in interface InputFilter
java.io.IOException
public int available()
available
in interface InputFilter
public void setBuffer(InputBuffer buffer)
setBuffer
in interface InputFilter
public void recycle()
recycle
in interface InputFilter
public ByteChunk getEncodingName()
getEncodingName
in interface InputFilter
protected int readBytes() throws java.io.IOException
java.io.IOException
protected boolean parseChunkHeader() throws java.io.IOException
java.io.IOException
@Deprecated protected boolean parseCRLF() throws java.io.IOException
parseCRLF(boolean)
java.io.IOException
protected void parseCRLF(boolean tolerant) throws java.io.IOException
tolerant
- Should tolerant parsing (LF and CRLF) be used? This
is recommended (RFC2616, section 19.3) for message
headers.
java.io.IOException
protected boolean parseEndChunk() throws java.io.IOException
java.io.IOException
|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |