java.net
Interface Compressor

- 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
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.