English 中文(简体)
java.util.zip - Inflater
  • 时间:2024-11-05

java.util.zip - Inflater Class


Previous Page Next Page  

Introduction

The java.util.zip.Inflater class provides support for general purpose decompression using the popular ZLIB compression pbrary. The ZLIB compression pbrary was initially developed as part of the PNG graphics standard and is not protected by patents. It is fully described in the specifications at the java.util.zip package description.

Class declaration

Following is the declaration for java.util.zip.Inflater class −

pubpc class Inflater
   extends Object

Constructors

Sr.No. Constructor & Description
1

Inflater()

Creates a new decompressor.

2

Inflater(boolean nowrap)

Creates a new decompressor.

Class methods

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.

Methods inherited

This class inherits methods from the following classes −

    java.lang.Object

Print