| |
|
| java.lang.Object org.apache.mina.filter.compression.Zlib
Zlib | class Zlib (Code) | | A helper class for interfacing with the JZlib library. This class acts both
as a compressor and decompressor, but only as one at a time. The only
flush method supported is Z_SYNC_FLUSH also known as Z_PARTIAL_FLUSH
author: The Apache MINA Project (dev@mina.apache.org) version: $Rev: 581234 $, $Date: 2007-10-02 07:39:48 -0600 (Tue, 02 Oct 2007) $ |
Constructor Summary | |
public | Zlib(int compressionLevel, int mode) Parameters: compressionLevel - the level of compression that should be used Parameters: mode - the mode in which the instance will operate. |
COMPRESSION_DEFAULT | final public static int COMPRESSION_DEFAULT(Code) | | |
COMPRESSION_MAX | final public static int COMPRESSION_MAX(Code) | | |
COMPRESSION_MIN | final public static int COMPRESSION_MIN(Code) | | |
COMPRESSION_NONE | final public static int COMPRESSION_NONE(Code) | | |
MODE_DEFLATER | final public static int MODE_DEFLATER(Code) | | |
MODE_INFLATER | final public static int MODE_INFLATER(Code) | | |
Zlib | public Zlib(int compressionLevel, int mode)(Code) | | Parameters: compressionLevel - the level of compression that should be used Parameters: mode - the mode in which the instance will operate. Can be eitherof MODE_DEFLATER or MODE_INFLATER |
cleanUp | public void cleanUp()(Code) | | Cleans up the resources used by the compression library.
|
deflate | public IoBuffer deflate(IoBuffer inBuffer) throws IOException(Code) | | Parameters: inBuffer - the buffer to be compressed. The contents are transferredinto a local byte array and the buffer is flipped and returned intact. the buffer with the compressed data throws: IOException - if the compression of teh buffer failed for some reason |
inflate | public IoBuffer inflate(IoBuffer inBuffer) throws IOException(Code) | | Parameters: inBuffer - the IoBuffer to be decompressed. The contentsof the buffer are transferred into a local byte array and the buffer isflipped and returned intact. the decompressed data throws: IOException - if the decompression of the data failed for some reason. |
|
|
|