com.caucho.quercus.lib.zlib
Class GZIPOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.util.zip.DeflaterOutputStream
com.caucho.quercus.lib.zlib.GZIPOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class GZIPOutputStream
- extends java.util.zip.DeflaterOutputStream
As opposed to java's GZIPOutputStream, this class allows for more control on
what is written to the underlying OutputStream.
- See Also:
GZIPOutputStream
Fields inherited from class java.util.zip.DeflaterOutputStream |
buf, def |
Fields inherited from class java.io.FilterOutputStream |
out |
Method Summary |
void |
close()
Calls super function, which in turn closes the underlying 'in' stream |
void |
finish()
|
void |
write(byte[] buffer,
int offset,
int length)
|
void |
write(int v)
Writes a byte. |
Methods inherited from class java.util.zip.DeflaterOutputStream |
deflate |
Methods inherited from class java.io.FilterOutputStream |
flush, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GZIPOutputStream
public GZIPOutputStream(java.io.OutputStream out,
int compressionLevel,
int strategy,
int encodingMode)
throws java.io.IOException
- Parameters:
out
- compressionLevel
- strategy
- Deflate compression strategyencodingMode
- FORCE_GZIP to write gzwrite compatible output;
FORCE_DEFLATE to write gzip header and zlib header,
but do not write crc32 trailer
- Throws:
java.io.IOException
GZIPOutputStream
public GZIPOutputStream(java.io.OutputStream out,
int compressionLevel,
int strategy)
throws java.io.IOException
- Parameters:
out
- compressionLevel
- strategy
- Deflate compression strategy
- Throws:
java.io.IOException
GZIPOutputStream
public GZIPOutputStream(java.io.OutputStream out)
throws java.io.IOException
- Parameters:
out
-
- Throws:
java.io.IOException
write
public void write(int v)
throws java.io.IOException
- Writes a byte.
- Overrides:
write
in class java.util.zip.DeflaterOutputStream
- Parameters:
input
-
- Throws:
java.io.IOException
write
public void write(byte[] buffer,
int offset,
int length)
throws java.io.IOException
- Overrides:
write
in class java.util.zip.DeflaterOutputStream
- Parameters:
input
- offset
- length
-
- Throws:
java.io.IOException
finish
public void finish()
throws java.io.IOException
- Overrides:
finish
in class java.util.zip.DeflaterOutputStream
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Calls super function, which in turn closes the underlying 'in' stream
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.util.zip.DeflaterOutputStream
- Throws:
java.io.IOException