public class SavedRequestInputFilter extends Object implements InputFilter
Modifier and Type | Field and Description |
---|---|
protected ByteChunk |
input
The original request body.
|
Constructor and Description |
---|
SavedRequestInputFilter(ByteChunk input)
Create a new SavedRequestInputFilter.
|
Modifier and Type | Method and Description |
---|---|
int |
available()
Amount of bytes still available in a buffer.
|
int |
doRead(ApplicationBufferHandler handler)
Read from the input stream into the ByteBuffer provided by the
ApplicationBufferHandler.
|
long |
end()
End the current request (has no effect).
|
ByteChunk |
getEncodingName()
Return the name of the associated encoding; here, the value is null.
|
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 (has no effect).
|
void |
setRequest(Request request)
Set the content length on the request.
|
protected ByteChunk input
public SavedRequestInputFilter(ByteChunk input)
input
- The saved request body to be replayed.public int doRead(ApplicationBufferHandler handler) throws IOException
InputBuffer
doRead
in interface InputBuffer
handler
- ApplicationBufferHandler that provides the buffer to read
data into.IOException
- If an I/O error occurs reading from the input streampublic void setRequest(Request request)
setRequest
in interface InputFilter
request
- The request to be associated with this filterpublic void recycle()
recycle
in interface InputFilter
public ByteChunk getEncodingName()
getEncodingName
in interface InputFilter
public void setBuffer(InputBuffer buffer)
setBuffer
in interface InputFilter
buffer
- The next bufferpublic int available()
available
in interface InputBuffer
public long end() throws IOException
end
in interface InputFilter
IOException
- If an error happenspublic boolean isFinished()
InputFilter
isFinished
in interface InputFilter
true
if the request body has been fully read, otherwise
false
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.