📅  最后修改于: 2020-11-14 10:53:24             🧑  作者: Mango
java.util.zip.Inflater类使用流行的ZLIB压缩库为通用解压缩提供支持。 ZLIB压缩库最初是作为PNG图形标准的一部分开发的,不受专利保护。在java.util.zip软件包说明中的规范中对其进行了全面描述。
以下是java.util.zip.Inflater类的声明-
public class Inflater
extends Object
Sr.No. | Constructor & Description |
---|---|
1 |
Inflater() Creates a new decompressor. |
2 |
Inflater(boolean nowrap) Creates a new decompressor. |
Sr.No. | Method & Description |
---|---|
1 | void end()
Closes the decompressor and discards any unprocessed input. |
2 | boolean finished()
Returns true if the end of the compressed data stream has been reached. |
3 | int getAdler()
Returns the ADLER-32 value of the uncompressed data. |
4 | long getBytesRead()
Returns the total number of compressed bytes input so far. |
5 | long getBytesWritten()
Returns the total number of uncompressed bytes output so far. |
6 | int getRemaining()
Returns the total number of bytes remaining in the input buffer. |
7 | int getTotalIn()
Returns the total number of compressed bytes input so far. |
8 | int getTotalOut()
Returns the total number of uncompressed bytes output so far. |
9 | int inflate(byte[] b)
Uncompresses bytes into specified buffer. |
10 | int inflate(byte[] b, int off, int len)
Uncompresses bytes into specified buffer. |
11 | boolean needsDictionary()
Returns true if a preset dictionary is needed for decompression. |
12 | boolean needsInput()
Returns true if no data remains in the input buffer. |
13 | void reset()
Resets inflater so that a new set of input data can be processed. |
14 | void setDictionary(byte[] b)
Sets the preset dictionary to the given array of bytes. |
15 | void setDictionary(byte[] b, int off, int len)
Sets the preset dictionary to the given array of bytes. |
16 | void setInput(byte[] b)
Sets input data for decompression. |
17 | void setInput(byte[] b, int off, int len)
Sets input data for decompression. |
此类从以下类继承方法-