📜  java.util.zip-GZIPOutputStream类

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


介绍

java.util.zip.GZIPOutputStream类实现了用于以GZIP文件格式写入压缩数据的流过滤器。

类声明

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

public class GZIPOutputStream
   extends DeflaterOutputStream

领域

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

  • 受保护的CRC32 crc -CRC-32,用于未压缩的数据。

建设者

Sr.No. Constructor & Description
1

GZIPOutputStream(OutputStream out)

Creates a new output stream with a default buffer size.

2

GZIPOutputStream(OutputStream out, boolean syncFlush)

Creates a new output stream with a default buffer size and the specified flush mode.

3

GZIPOutputStream(OutputStream out, int size)

Creates a new output stream with the specified buffer size.

4

GZIPOutputStream(OutputStream out, int size, boolean syncFlush)

Creates a new output stream with the specified buffer size and flush mode.

类方法

Sr.No. Method & Description
1 void finish()

Finishes writing compressed data to the output stream without closing the underlying stream.

2 int write(byte[] buf, int off, int len)

Writes array of bytes to the compressed output stream.

方法继承

此类从以下类继承方法-

  • java.util.zip.DeflaterOutputStream
  • java.io.FilterOutputStream
  • java.lang.Object

打印