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

Quick Search    Search Deep

java.net
Interface Compressor  view Compressor download Compressor.java

All Known Implementing Classes:
DeflatingCompressor

public interface Compressor

This interface models the common methods that every compressor must provide in order to be used as a "plugin" into the compression layer. The interface scheme is based on the Deflater class, the standard compression engine available in every JVM. If you want to provide a new compression engine, you have to implement this interface and pass the class name as the property compressor:
java -Dcompressor=java.net.DeflatingCompressor ....

Version:
1.0

Method Summary
 int deflate(byte[] b)
           
 int deflate(byte[] b, int off, int len)
           
 void end()
           
 void finish()
           
 boolean finished()
           
 int getAdler()
           
 int getLevel()
          This method isn't present in the original java.net.Deflater but it's really useful.
 int getLevels()
          This method returns information about the compression engine capabilities, as the number of supported compression levels.
 int getTotalIn()
           
 int getTotalOut()
           
 boolean needsInput()
           
 void reset()
           
 void setDictionary(byte[] dic)
           
 void setDictionary(byte[] dic, int off, int len)
           
 void setInput(byte[] b)
           
 void setInput(byte[] b, int off, int len)
           
 void setLevel(int l)
           
 void setStrategy(int st)
           
 

Method Detail

deflate

public int deflate(byte[] b)

deflate

public int deflate(byte[] b,
                   int off,
                   int len)

end

public void end()

finish

public void finish()

finished

public boolean finished()

getAdler

public int getAdler()

getTotalIn

public int getTotalIn()

getTotalOut

public int getTotalOut()

needsInput

public boolean needsInput()

reset

public void reset()

setDictionary

public void setDictionary(byte[] dic)

setDictionary

public void setDictionary(byte[] dic,
                          int off,
                          int len)

setInput

public void setInput(byte[] b)

setInput

public void setInput(byte[] b,
                     int off,
                     int len)

setLevel

public void setLevel(int l)

setStrategy

public void setStrategy(int st)

getLevel

public int getLevel()
This method isn't present in the original java.net.Deflater but it's really useful.


getLevels

public int getLevels()
This method returns information about the compression engine capabilities, as the number of supported compression levels.