Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.net
Class DeflatingCompressor  view DeflatingCompressor download DeflatingCompressor.java

java.lang.Object
  extended byjava.util.zip.Deflater
      extended byjava.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.
 
Fields inherited from class java.util.zip.Deflater
BEST_COMPRESSION, BEST_SPEED, DEFAULT_COMPRESSION, DEFAULT_STRATEGY, DEFLATED, FILTERED, HUFFMAN_ONLY, NO_COMPRESSION
 
Constructor Summary
DeflatingCompressor()
           
 
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 class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.net.Compressor
deflate, deflate, end, finish, finished, getAdler, getTotalIn, getTotalOut, needsInput, reset, setDictionary, setDictionary, setInput, setInput, setStrategy
 

Field Detail

level

protected int level
The actual working level of the compressor instance.


numlevels

protected static int numlevels
The number of supported compression level.

Constructor Detail

DeflatingCompressor

public DeflatingCompressor()
Method Detail

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