org.apache.coyote.http11.filters
Class FlushableGZIPOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.util.zip.DeflaterOutputStream
java.util.zip.GZIPOutputStream
org.apache.coyote.http11.filters.FlushableGZIPOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class FlushableGZIPOutputStream
- extends GZIPOutputStream
Extension of GZIPOutputStream
to workaround for a couple of long
standing JDK bugs
(Bug
4255743 and
Bug
4813885) so the GZIP'd output can be flushed.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FlushableGZIPOutputStream
public FlushableGZIPOutputStream(OutputStream os)
throws IOException
- Throws:
IOException
write
public void write(byte[] bytes)
throws IOException
- Overrides:
write
in class FilterOutputStream
- Throws:
IOException
write
public void write(byte[] bytes,
int offset,
int length)
throws IOException
- Overrides:
write
in class GZIPOutputStream
- Throws:
IOException
write
public void write(int i)
throws IOException
- Overrides:
write
in class DeflaterOutputStream
- Throws:
IOException
finish
public void finish()
throws IOException
- Overrides:
finish
in class GZIPOutputStream
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class DeflaterOutputStream
- Throws:
IOException
flush
public void flush()
throws IOException
- Specified by:
flush
in interface Flushable
- Overrides:
flush
in class FilterOutputStream
- Throws:
IOException
deflate
protected void deflate()
throws IOException
- Overrides:
deflate
in class DeflaterOutputStream
- Throws:
IOException
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.