java.util.zip - GZIPOutputStream类

简介

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

类声明

以下是 java.util.zip.GZIPOutputStream class :

public class GZIPOutputStream
   extends DeflaterOutputStream

字段

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

  • protected CRC32 crc:CRC-32 for uncompressed data.

构造函数

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
1void finish()

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

2int 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