public class GzipOutputFilter extends java.lang.Object implements OutputFilter
| Modifier and Type | Class and Description |
|---|---|
protected class |
GzipOutputFilter.FakeOutputStream |
| Modifier and Type | Field and Description |
|---|---|
protected OutputBuffer |
buffer
Next buffer in the pipeline.
|
protected java.util.zip.GZIPOutputStream |
compressionStream
Compression output stream.
|
protected java.io.OutputStream |
fakeOutputStream
Fake internal output stream.
|
protected static Log |
log
Logger.
|
| Constructor and Description |
|---|
GzipOutputFilter() |
| Modifier and Type | Method and Description |
|---|---|
int |
doWrite(ByteChunk chunk,
Response res)
Write some bytes.
|
long |
end()
End the current request.
|
void |
flush()
Added to allow flushing to happen for the gzip'ed outputstream
|
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 Log log
protected OutputBuffer buffer
protected java.util.zip.GZIPOutputStream compressionStream
protected java.io.OutputStream fakeOutputStream
public int doWrite(ByteChunk chunk, Response res) throws java.io.IOException
doWrite in interface OutputFilterdoWrite in interface OutputBufferchunk - data to writeres - used to allow buffers that can be shared by multiple
responses.java.io.IOExceptionpublic long getBytesWritten()
OutputBuffergetBytesWritten in interface OutputBufferpublic void flush()
public void setResponse(Response response)
setResponse in interface OutputFilterpublic void setBuffer(OutputBuffer buffer)
setBuffer in interface OutputFilterpublic long end()
throws java.io.IOException
end in interface OutputFilterjava.io.IOExceptionpublic void recycle()
recycle in interface OutputFilterCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.