java.net
Class DeflatingCompressor

java.lang.Object
java.util.zip.Deflater
java.net.DeflatingCompressor
- All Implemented Interfaces:
- Compressor
- public class DeflatingCompressor
- extends java.util.zip.Deflater
- implements Compressor
This class is the default compressor used in our compression layer.
It merely implements the Compressor interface through direct inclusion
of the Deflater class (that provided the idea of the Compressor interface).
The only plus is the compression level number calculation and some utility method.
- Version:
- 1.0
|
Field Summary |
protected int |
level
The actual working level of the compressor instance. |
protected static int |
numlevels
The number of supported compression level. |
|
Method Summary |
int |
getLevel()
This method returns the actual working level. |
int |
getLevels()
This method returns the number of supported compression levels. |
void |
setLevel(int l)
This method sets the working level of the compression engine and store it into the
level 55 field. |
| Methods inherited from class java.util.zip.Deflater |
deflate, deflate, end, finalize, finish, finished, getAdler, getTotalIn, getTotalOut, needsInput, reset, setDictionary, setDictionary, setInput, setInput, setStrategy |
| Methods inherited from interface java.net.Compressor |
deflate, deflate, end, finish, finished, getAdler, getTotalIn, getTotalOut, needsInput, reset, setDictionary, setDictionary, setInput, setInput, setStrategy |
level
protected int level
- The actual working level of the compressor instance.
numlevels
protected static int numlevels
- The number of supported compression level.
DeflatingCompressor
public DeflatingCompressor()
setLevel
public void setLevel(int l)
- This method sets the working level of the compression engine and store it into the
level 55 field.
- Specified by:
setLevel in interface Compressor
getLevel
public int getLevel()
- This method returns the actual working level.
- Specified by:
getLevel in interface Compressor
getLevels
public int getLevels()
- This method returns the number of supported compression levels.
- Specified by:
getLevels in interface Compressor