|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Method Summary | |
Compressor |
createInstance()
Creates a new instance of the implemented Deflation class. |
int |
deflate(byte[] b)
Fills specified buffer with compressed data. |
int |
deflate(byte[] b,
int off,
int len)
Fills specified buffer with compressed data. |
void |
end()
Discards unprocessed input and frees internal data. |
void |
finish()
When called, indicates that compression should end with the current contents of the input buffer. |
boolean |
finished()
Returns true if the end of the compressed data output stream has been reached. |
java.lang.String |
getName()
|
int |
getTotalIn()
Returns the total number of bytes input so far. |
int |
getTotalOut()
Returns the total number of bytes output so far. |
int |
getVersion()
|
boolean |
needsInput()
Returns true if the input data buffer is empty and setInput() should be called in order to provide more input. |
void |
reset()
Resets deflater so that a new set of input data can be processed. |
void |
setDictionary(byte[] b)
Sets preset dictionary for compression. |
void |
setDictionary(byte[] b,
int off,
int len)
Sets preset dictionary for compression. |
void |
setInput(byte[] b)
Sets input data for compression. |
void |
setInput(byte[] b,
int off,
int len)
Sets input data for compression. |
void |
setLevel(int level)
Sets the current compression level to the specified value. |
void |
setStrategy(int strategy)
Sets the compression strategy to the specified value. |
Method Detail |
public java.lang.String getName()
public int getVersion()
public void setInput(byte[] b, int off, int len)
b
- the input data bytesoff
- the start offset of the datalen
- the length of the dataDeflater#needsInput
public void setInput(byte[] b)
b
- the input data bytesDeflater#needsInput
public void setDictionary(byte[] b, int off, int len)
b
- the dictionary data bytesoff
- the start offset of the datalen
- the length of the dataInflater#inflate
,
Inflater#getAdler
public void setDictionary(byte[] b)
b
- the dictionary data bytesInflater#inflate
,
Inflater#getAdler
public void setStrategy(int strategy)
strategy
- the new compression strategyjava.lang.IllegalArgumentException
- if the compression strategy is
invalidpublic void setLevel(int level)
level
- the new compression leveljava.lang.IllegalArgumentException
- if the compression level is invalidpublic boolean needsInput()
public void finish()
public boolean finished()
public int deflate(byte[] b, int off, int len)
b
- the buffer for the compressed dataoff
- the start offset of the datalen
- the maximum number of bytes of compressed datapublic int deflate(byte[] b)
b
- the buffer for the compressed datapublic int getTotalIn()
public int getTotalOut()
public void reset()
public void end()
public Compressor createInstance()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |