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:
- java.io.Closeable, java.io.Flushable
public class FlushableGZIPOutputStream
- extends java.util.zip.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.
Fields inherited from class java.util.zip.GZIPOutputStream |
crc |
Fields inherited from class java.util.zip.DeflaterOutputStream |
buf, def |
Fields inherited from class java.io.FilterOutputStream |
out |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FlushableGZIPOutputStream
public FlushableGZIPOutputStream(java.io.OutputStream os)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(byte[] bytes)
throws java.io.IOException
- Overrides:
write
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
write
public void write(byte[] bytes,
int offset,
int length)
throws java.io.IOException
- Overrides:
write
in class java.util.zip.GZIPOutputStream
- Throws:
java.io.IOException
write
public void write(int i)
throws java.io.IOException
- Overrides:
write
in class java.util.zip.DeflaterOutputStream
- Throws:
java.io.IOException
finish
public void finish()
throws java.io.IOException
- Overrides:
finish
in class java.util.zip.GZIPOutputStream
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.util.zip.DeflaterOutputStream
- Throws:
java.io.IOException
flush
public void flush()
throws java.io.IOException
- Specified by:
flush
in interface java.io.Flushable
- Overrides:
flush
in class java.io.FilterOutputStream
- Throws:
java.io.IOException
deflate
protected void deflate()
throws java.io.IOException
- Overrides:
deflate
in class java.util.zip.DeflaterOutputStream
- Throws:
java.io.IOException
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.