com.limegroup.gnutella.util
Class CompressingOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.util.zip.DeflaterOutputStream
com.limegroup.gnutella.util.CompressingOutputStream
- public final class CompressingOutputStream
- extends java.util.zip.DeflaterOutputStream
Simulates zlib's Z_PARTIAL_FLUSH and Z_SYNC_FLUSH behaviour.
This is a workaround for the following bugParade bugs:
http://developer.java.sun.com/developer/bugParade/bugs/4255743.html
http://developer.java.sun.com/developer/bugParade/bugs/4206909.html
The code was taken from the comments at those respective pages and
modified slightly.
Fields inherited from class java.util.zip.DeflaterOutputStream |
buf, def |
Fields inherited from class java.io.FilterOutputStream |
out |
Method Summary |
protected void |
deflate()
|
void |
flush()
Insure all remaining data will be output. |
Methods inherited from class java.util.zip.DeflaterOutputStream |
close, finish, write, write |
Methods inherited from class java.io.FilterOutputStream |
write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompressingOutputStream
public CompressingOutputStream(java.io.OutputStream out,
java.util.zip.Deflater flate)
flush
public void flush()
throws java.io.IOException
- Insure all remaining data will be output.
- Throws:
java.io.IOException
deflate
protected void deflate()
throws java.io.IOException
- Throws:
java.io.IOException