|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.zip.Inflater
public class Inflater
The Inflater class is used to decompress bytes using the DEFLATE compression algorithm. Inflation is performed by the ZLIB compression library.
DeflaterOutputStream,
Inflater| Field Summary | |
|---|---|
(package private) int |
inLength
|
(package private) int |
inRead
|
| Constructor Summary | |
|---|---|
Inflater()
Constructs a new Inflater instance. |
|
Inflater(boolean noHeader)
Constructs a new Inflater instance. |
|
| Method Summary | |
|---|---|
void |
end()
Release any resources associated with this Inflater. |
protected void |
finalize()
Called by the virtual machine when there are no longer any (non-weak) references to the receiver. |
boolean |
finished()
Indicates if the Inflater has inflated the entire deflated stream. |
int |
getAdler()
Returns the Adler32 checksum of either all bytes inflated, or the checksum of the preset dictionary if one has been supplied. |
long |
getBytesRead()
Returns a long int of total number of bytes of input read by the Inflater. |
long |
getBytesWritten()
Returns a long int of total number of bytes of input output by the Inflater. |
int |
getRemaining()
Returns the number of bytes of current input remaining to be read by the inflater |
int |
getTotalIn()
Returns total number of bytes of input read by the Inflater. |
int |
getTotalOut()
Returns total number of bytes of input output by the Inflater. |
int |
inflate(byte[] buf)
Inflates bytes from current input and stores them in buf. |
int |
inflate(byte[] buf,
int off,
int nbytes)
Inflates up to nbytes bytes from current input and stores them in buf starting at off. |
boolean |
needsDictionary()
Indicates whether the input bytes were compressed with a preset dictionary. |
boolean |
needsInput()
|
void |
reset()
Resets the Inflater. |
void |
setDictionary(byte[] buf)
Sets the preset dictionary to be used for inflation to buf. |
void |
setDictionary(byte[] buf,
int off,
int nbytes)
|
(package private) int |
setFileInput(FileDescriptor fd,
long off,
int nbytes)
Sets the current input to the region within a file starting at off and ending at nbytes - 1. |
void |
setInput(byte[] buf)
Sets the current input to buf. |
void |
setInput(byte[] buf,
int off,
int nbytes)
Sets the current input to the region of buf starting at off and ending at nbytes - 1. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
int inRead
int inLength
| Constructor Detail |
|---|
public Inflater()
public Inflater(boolean noHeader)
noHeader - If true, read a ZLIB header from input.| Method Detail |
|---|
public void end()
protected void finalize()
ObjectNote: The virtual machine assumes that the implementation in class Object is empty.
finalize in class Objectpublic boolean finished()
public int getAdler()
public int getRemaining()
public int getTotalIn()
public int getTotalOut()
public int inflate(byte[] buf)
throws DataFormatException
buf - Buffer to output inflated bytes
DataFormatException - If the underlying stream is corrupted or was not DEFLATED
public int inflate(byte[] buf,
int off,
int nbytes)
throws DataFormatException
buf - Buffer to output inflated bytesoff - Offset in buffer into which to store inflated bytesnbytes - Number of inflated bytes to store
DataFormatException - If the underlying stream is corrupted or was not DEFLATEDpublic boolean needsDictionary()
setDictionary(byte[]),
setDictionary(byte[], int, int)public boolean needsInput()
public void reset()
public void setDictionary(byte[] buf)
buf - The buffer containing the dictionary bytesneedsDictionary
public void setDictionary(byte[] buf,
int off,
int nbytes)
public void setInput(byte[] buf)
buf - input bufferneedsInput()
public void setInput(byte[] buf,
int off,
int nbytes)
buf - input bufferoff - offset to read from in buffernbytes - number of bytes to readneedsInput()
int setFileInput(FileDescriptor fd,
long off,
int nbytes)
file - input fileoff - offset to read from in buffernbytes - number of bytes to readneedsInput()public long getBytesRead()
public long getBytesWritten()
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||