Input filter responsible for reading and buffering the request body, so that it does not interfere with client SSL handshake messages.
Method SummaryModifier and TypeMethodDescription
intObtain an estimate of the number of bytes that can be read without blocking.
intFills the given ByteBuffer with the buffered request body.
end()End the current request.
(int size)Get the name of the encoding handled by this filter.
booleanHas the request body been read fully?
recycle()Make the filter ready to process the next request.
voidSet the next buffer in the filter pipeline.
(int limit)Set the buffering limit.
voidReads the request body and buffers it.
setLimitpublic void setLimit
(int limit)Set the buffering limit. This should be reset every time the buffer is used.
limit- The maximum number of bytes that will be buffered
setRequestpublic void setRequest
(Request request)Reads the request body and buffers it.
doReadFills the given ByteBuffer with the buffered request body.
setBufferpublic void setBuffer
(InputBuffer buffer)Set the next buffer in the filter pipeline.
recyclepublic void recycle()Make the filter ready to process the next request.
getEncodingNamepublic ByteChunk getEncodingName()Get the name of the encoding handled by this filter.
endpublic long end() throws IOExceptionEnd the current request.
- Specified by:
- 0 is the expected return value. A positive value indicates that too many bytes were read. This method is allowed to use buffer.doRead to consume extra bytes. The result of this method can't be negative (if an error happens, an IOException should be thrown instead).
IOException- If an error happens
availablepublic int available()Description copied from interface:
InputBufferObtain an estimate of the number of bytes that can be read without blocking. Typically, this will be the number of available bytes known to be buffered.
isFinishedpublic boolean isFinished()Has the request body been read fully?
setByteBufferpublic void setByteBuffer
getByteBufferpublic ByteBuffer getByteBuffer()
expandpublic void expand