public class BufferedInputFilter extends java.lang.Object implements InputFilter
| Constructor and Description |
|---|
BufferedInputFilter() |
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Obtain an estimate of the number of bytes that can be read without
blocking.
|
int |
doRead(ByteChunk chunk,
Request request)
Fills the given ByteChunk with the buffered request body.
|
long |
end()
End the current request.
|
ByteChunk |
getEncodingName()
Get the name of the encoding handled by this filter.
|
void |
recycle()
Make the filter ready to process the next request.
|
void |
setBuffer(InputBuffer buffer)
Set the next buffer in the filter pipeline.
|
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 InputFilterpublic int doRead(ByteChunk chunk, Request request) throws java.io.IOException
doRead in interface InputFilterdoRead in interface InputBufferchunk - The buffer to read data into.request - The associated requestjava.io.IOException - If an I/O error occurs reading from the input streampublic void setBuffer(InputBuffer buffer)
InputFiltersetBuffer in interface InputFilterpublic void recycle()
InputFilterrecycle in interface InputFilterpublic ByteChunk getEncodingName()
InputFiltergetEncodingName in interface InputFilterpublic long end()
throws java.io.IOException
InputFilterend in interface InputFilterjava.io.IOExceptionpublic int available()
InputBufferavailable in interface InputBufferCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.