Javazip 简明教程

java.util.zip - CheckedOutputStream Class

Introduction

java.util.zip.CheckedOutputStream 类是一个输出流,还维护着正在写入的数据的校验和。然后可以使用校验和验证输出数据的完整性。

The java.util.zip.CheckedOutputStream class is an output stream that also maintains a checksum of the data being written. The checksum can then be used to verify the integrity of the output data.

Class Declaration

java.util.zip.CheckedOutputStream 类的声明如下所示:

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

public class CheckedOutputStream
   extends FilterOutputStream

Constructors

Sr.No.

Constructor & Description

1

CheckedOutputStream(OutputStream out, Checksum cksum) Creates an output stream with the specified Checksum.

Class Methods

Sr.No.

Method & Description

1

Checksum getChecksum()Returns the Checksum for this output stream.

2

void write(byte[] b, int off, int len)Writes an array of bytes.

3

void write(int b)Writes a byte.

Methods Inherited

此类从以下类中继承方法:

This class inherits methods from the following classes −

  1. java.io.FilterOutputStream

  2. java.lang.Object