📜  java.util.zip-DeflaterInputStream类

📅  最后修改于: 2020-11-14 10:52:14             🧑  作者: Mango


介绍

java.util.zip.DeflaterInputStream类实现了一个输入流过滤器,用于以“ deflate”压缩格式压缩数据。

类声明

以下是java.util.zip.DeflaterInputStream类的声明-

public class DeflaterInputStream
   extends FilterInputStream

领域

以下是java.util.zip.DeflaterInputStream类的字段-

  • protected byte [] buf-用于读取压缩数据的输入缓冲区。

  • 受保护的Deflater def-此流的压缩器。

建设者

Sr.No. Constructor & Description
1

DeflaterInputStream(InputStream in)

Creates a new input stream with a default compressor and buffer size.

2

DeflaterInputStream(InputStream in, Deflater defl)

Creates a new input stream with the specified compressor and a default buffer size.

3

DeflaterInputStream(InputStream in, Deflater defl, int bufLen)

Creates a new input stream with the specified compressor and buffer size.

类方法

Sr.No. Method & Description
1 int available()

Returns 0 after EOF has been reached, otherwise always return 1.

2 void close()

Closes this input stream and its underlying input stream, discarding any pending uncompressed data.

3 int read()

Reads a single byte of compressed data from the input stream.

4 int read(byte[] b, int off, int len)

Reads compressed data into a byte array.

5 long skip(long n)

Skips over and discards data from the input stream.

方法继承

此类从以下类继承方法-

  • java.io.FilterInputStream
  • java.lang.Object

打印