public class ZlibOutputStream extends AbstractBinaryOutput
GZIPOutputStream
SEEK_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, write
public 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.IOException
public ZlibOutputStream(java.io.OutputStream os, int compressionLevel, int strategy) throws java.io.IOException
os
- compressionLevel
- strategy
- Deflate compression strategyjava.io.IOException
public ZlibOutputStream(java.io.OutputStream os) throws java.io.IOException
java.io.IOException
public void write(int v) throws java.io.IOException
write
in class java.io.OutputStream
input
- java.io.IOException
public void write(byte[] buffer, int offset, int length) throws java.io.IOException
BinaryOutput
write
in interface BinaryOutput
write
in class java.io.OutputStream
input
- offset
- length
- java.io.IOException
public void flush()
AbstractBinaryOutput
flush
in interface BinaryOutput
flush
in interface java.io.Flushable
flush
in class AbstractBinaryOutput
public void closeWrite()
AbstractBinaryOutput
closeWrite
in interface BinaryOutput
closeWrite
in class AbstractBinaryOutput
public void close()
AbstractBinaryOutput
close
in interface BinaryOutput
close
in interface BinaryStream
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class AbstractBinaryOutput
public boolean isEOF()
isEOF
in interface BinaryStream
isEOF
in class AbstractBinaryOutput
public long getPosition()
getPosition
in interface BinaryStream
getPosition
in class AbstractBinaryOutput
public boolean setPosition(long offset)
setPosition
in interface BinaryStream
setPosition
in class AbstractBinaryOutput
public java.lang.String toString()
toString
in class java.lang.Object