public class BufferedInputFilter extends java.lang.Object implements InputFilter, ApplicationBufferHandler
| Constructor and Description |
|---|
BufferedInputFilter() |
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Amount of bytes still available in a buffer.
|
int |
doRead(ApplicationBufferHandler handler)
Fills the given ByteBuffer with the buffered request body.
|
long |
end()
End the current request.
|
void |
expand(int size) |
java.nio.ByteBuffer |
getByteBuffer() |
ByteChunk |
getEncodingName()
Get the name of the encoding handled by this filter.
|
boolean |
isFinished()
Has the request body been read fully?
|
void |
recycle()
Make the filter ready to process the next request.
|
void |
setBuffer(InputBuffer buffer)
Set the next buffer in the filter pipeline.
|
void |
setByteBuffer(java.nio.ByteBuffer buffer) |
void |
setLimit(int limit)
Set the buffering limit.
|
void |
setRequest(Request request)
Reads the request body and buffers it.
|
public void setLimit(int limit)
limit - The maximum number of bytes that will be bufferedpublic void setRequest(Request request)
setRequest in interface InputFilterrequest - The request to be associated with this filterpublic int doRead(ApplicationBufferHandler handler) throws java.io.IOException
doRead in interface InputBufferhandler - ApplicationBufferHandler that provides the buffer to read
data into.java.io.IOException - If an I/O error occurs reading from the input streampublic void setBuffer(InputBuffer buffer)
InputFiltersetBuffer in interface InputFilterbuffer - The next bufferpublic void recycle()
InputFilterrecycle in interface InputFilterpublic ByteChunk getEncodingName()
InputFiltergetEncodingName in interface InputFilterpublic long end()
throws java.io.IOException
InputFilterend in interface InputFilterjava.io.IOException - If an error happenspublic int available()
InputFilteravailable in interface InputFilterpublic boolean isFinished()
InputFilterisFinished in interface InputFiltertrue if the request body has been fully read, otherwise
falsepublic void setByteBuffer(java.nio.ByteBuffer buffer)
setByteBuffer in interface ApplicationBufferHandlerpublic java.nio.ByteBuffer getByteBuffer()
getByteBuffer in interface ApplicationBufferHandlerpublic void expand(int size)
expand in interface ApplicationBufferHandlerCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.