|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
com.caucho.quercus.lib.file.AbstractBinaryOutput
com.caucho.quercus.lib.zlib.ZlibOutputStream
public class ZlibOutputStream
As opposed to java's GZIPOutputStream, this class allows for more control on what is written to the underlying OutputStream.
GZIPOutputStream
Field Summary |
---|
Fields inherited from interface com.caucho.quercus.lib.file.BinaryStream |
---|
SEEK_CUR, SEEK_END, SEEK_SET |
Constructor Summary | |
---|---|
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)
|
Method Summary | |
---|---|
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. |
Methods inherited from class com.caucho.quercus.lib.file.AbstractBinaryOutput |
---|
getOutputStream, getResourceType, print, print, seek, stat, write |
Methods inherited from class java.io.OutputStream |
---|
write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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 trailer
java.io.IOException
public ZlibOutputStream(java.io.OutputStream os, int compressionLevel, int strategy) throws java.io.IOException
os
- compressionLevel
- strategy
- Deflate compression strategy
java.io.IOException
public ZlibOutputStream(java.io.OutputStream os) throws java.io.IOException
java.io.IOException
Method Detail |
---|
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 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |