| Method from org.apache.coyote.http11.filters.GzipOutputFilter Detail: |
public int doWrite(ByteChunk chunk,
Response res) throws IOException {
// --------------------------------------------------- OutputBuffer Methods
if (compressionStream == null) {
compressionStream = new GZIPOutputStream(fakeOutputStream);
}
compressionStream.write(chunk.getBytes(), chunk.getStart(),
chunk.getLength());
return chunk.getLength();
}
|
public long end() throws IOException {
if (compressionStream == null) {
compressionStream = new GZIPOutputStream(fakeOutputStream);
}
compressionStream.finish();
compressionStream.close();
return ((OutputFilter) buffer).end();
}
End the current request. It is acceptable to write extra bytes using
buffer.doWrite during the execution of this method. |
public ByteChunk getEncodingName() {
return ENCODING;
}
Return the name of the associated encoding; Here, the value is
"identity". |
public void recycle() {
// Set compression stream to null
compressionStream = null;
}
Make the filter ready to process the next request. |
public void setBuffer(OutputBuffer buffer) {
this.buffer = buffer;
}
Set the next buffer in the filter pipeline. |
public void setResponse(Response response) {
}
Some filters need additional parameters from the response. All the
necessary reading can occur in that method, as this method is called
after the response header processing is complete. |