public class ChunkedOutputFilter extends Object implements OutputFilter
| Modifier and Type | Field and Description |
|---|---|
protected OutputBuffer |
buffer
Next buffer in the pipeline.
|
protected ByteChunk |
chunkHeader
Chunk header.
|
protected byte[] |
chunkLength
Buffer used for chunk length conversion.
|
protected static ByteChunk |
END_CHUNK
End chunk.
|
| Constructor and Description |
|---|
ChunkedOutputFilter()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
doWrite(ByteChunk chunk,
Response res)
Write some bytes.
|
long |
end()
End the current request.
|
long |
getBytesWritten()
Bytes written to the underlying socket.
|
void |
recycle()
Make the filter ready to process the next request.
|
void |
setBuffer(OutputBuffer buffer)
Set the next buffer in the filter pipeline.
|
void |
setResponse(Response response)
Some filters need additional parameters from the response.
|
protected static final ByteChunk END_CHUNK
protected OutputBuffer buffer
protected byte[] chunkLength
protected ByteChunk chunkHeader
public int doWrite(ByteChunk chunk, Response res) throws IOException
doWrite in interface OutputFilterdoWrite in interface OutputBufferchunk - data to writeres - The response to which the data should be written.
(Should be the response already associated with the
OutputBuffer).IOException - an underlying I/O error occurredpublic long getBytesWritten()
OutputBuffergetBytesWritten in interface OutputBufferpublic void setResponse(Response response)
OutputFiltersetResponse in interface OutputFilterpublic void setBuffer(OutputBuffer buffer)
OutputFiltersetBuffer in interface OutputFilterpublic long end()
throws IOException
OutputFilterend in interface OutputFilterIOExceptionpublic void recycle()
OutputFilterrecycle in interface OutputFilterCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.