HttpOutputBuffer, OutputFilter, OutputBufferpublic class ChunkedOutputFilter extends java.lang.Object implements OutputFilter
| Modifier and Type | Field | Description |
|---|---|---|
protected HttpOutputBuffer |
buffer |
Next buffer in the pipeline.
|
protected java.nio.ByteBuffer |
chunkHeader |
Chunk header.
|
protected java.nio.ByteBuffer |
crlfChunk |
|
protected java.nio.ByteBuffer |
endChunk |
End chunk.
|
protected java.nio.ByteBuffer |
lastChunk |
| Constructor | Description |
|---|---|
ChunkedOutputFilter() |
| Modifier and Type | Method | Description |
|---|---|---|
int |
doWrite(java.nio.ByteBuffer chunk) |
Write the given data to the response.
|
void |
end() |
Finish writing the current response.
|
void |
flush() |
Flushes any unwritten data to the client.
|
long |
getBytesWritten() |
Bytes written to the underlying socket.
|
void |
recycle() |
Make the filter ready to process the next request.
|
void |
setBuffer(HttpOutputBuffer buffer) |
Set the next buffer in the filter pipeline.
|
void |
setResponse(Response response) |
Some filters need additional parameters from the response.
|
protected HttpOutputBuffer buffer
protected final java.nio.ByteBuffer chunkHeader
protected final java.nio.ByteBuffer lastChunk
protected final java.nio.ByteBuffer crlfChunk
protected final java.nio.ByteBuffer endChunk
public int doWrite(java.nio.ByteBuffer chunk)
throws java.io.IOException
OutputBufferdoWrite in interface OutputBufferchunk - data to writejava.io.IOException - an underlying I/O error occurredpublic long getBytesWritten()
OutputBuffergetBytesWritten in interface OutputBufferpublic void setResponse(Response response)
OutputFiltersetResponse in interface OutputFilterresponse - The response to associate with this OutputFilterpublic void setBuffer(HttpOutputBuffer buffer)
OutputFiltersetBuffer in interface OutputFilterbuffer - The next buffer instancepublic void flush()
throws java.io.IOException
HttpOutputBufferflush in interface HttpOutputBufferjava.io.IOException - If an I/O error occurs while flushingpublic void end()
throws java.io.IOException
HttpOutputBufferOutputBuffer.doWrite(java.nio.ByteBuffer) during the execution of
this method.end in interface HttpOutputBufferjava.io.IOException - If an I/O error occurs while writing to the clientpublic void recycle()
OutputFilterrecycle in interface OutputFilterCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.