public class ZlibOutputStream extends AbstractBinaryOutput
GZIPOutputStreamSEEK_CUR, SEEK_END, SEEK_SET| Constructor and Description |
|---|
ZlibOutputStream(java.io.OutputStream os) |
ZlibOutputStream(java.io.OutputStream os,
int compressionLevel,
int strategy) |
ZlibOutputStream(java.io.OutputStream os,
int compressionLevel,
int strategy,
int encodingMode) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the stream.
|
void |
closeWrite()
Closes the file.
|
void |
flush()
Flushes the output.
|
long |
getPosition()
Tells the position in the gzip stream
|
boolean |
isEOF()
Returns false always for a write stream.
|
boolean |
setPosition(long offset)
Sets the position.
|
java.lang.String |
toString() |
void |
write(byte[] buffer,
int offset,
int length)
Writes a buffer.
|
void |
write(int v)
Writes a byte.
|
getOutputStream, getResourceType, print, print, seek, stat, writepublic ZlibOutputStream(java.io.OutputStream os,
int compressionLevel,
int strategy,
int encodingMode)
throws java.io.IOException
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 trailerjava.io.IOExceptionpublic ZlibOutputStream(java.io.OutputStream os,
int compressionLevel,
int strategy)
throws java.io.IOException
os - compressionLevel - strategy - Deflate compression strategyjava.io.IOExceptionpublic ZlibOutputStream(java.io.OutputStream os)
throws java.io.IOException
java.io.IOExceptionpublic void write(int v)
throws java.io.IOException
write in class java.io.OutputStreaminput - java.io.IOExceptionpublic void write(byte[] buffer,
int offset,
int length)
throws java.io.IOException
BinaryOutputwrite in interface BinaryOutputwrite in class java.io.OutputStreaminput - offset - length - java.io.IOExceptionpublic void flush()
AbstractBinaryOutputflush in interface BinaryOutputflush in interface java.io.Flushableflush in class AbstractBinaryOutputpublic void closeWrite()
AbstractBinaryOutputcloseWrite in interface BinaryOutputcloseWrite in class AbstractBinaryOutputpublic void close()
AbstractBinaryOutputclose in interface BinaryOutputclose in interface BinaryStreamclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class AbstractBinaryOutputpublic boolean isEOF()
isEOF in interface BinaryStreamisEOF in class AbstractBinaryOutputpublic long getPosition()
getPosition in interface BinaryStreamgetPosition in class AbstractBinaryOutputpublic boolean setPosition(long offset)
setPosition in interface BinaryStreamsetPosition in class AbstractBinaryOutputpublic java.lang.String toString()
toString in class java.lang.Object