public class BufferedInputFilter extends java.lang.Object implements InputFilter
Constructor and Description |
---|
BufferedInputFilter() |
Modifier and Type | Method and Description |
---|---|
int |
available()
Amount of bytes still available in a buffer.
|
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.
|
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 |
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 InputFilter
public int doRead(ByteChunk chunk, Request request) throws java.io.IOException
doRead
in interface InputFilter
doRead
in interface InputBuffer
java.io.IOException
public void setBuffer(InputBuffer buffer)
InputFilter
setBuffer
in interface InputFilter
public void recycle()
InputFilter
recycle
in interface InputFilter
public ByteChunk getEncodingName()
InputFilter
getEncodingName
in interface InputFilter
public long end() throws java.io.IOException
InputFilter
end
in interface InputFilter
java.io.IOException
public int available()
InputFilter
available
in interface InputFilter
public boolean isFinished()
InputFilter
isFinished
in interface InputFilter
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.