CheckedOutputStream 

Introduction

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

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

publicclassCheckedOutputStreamextendsFilterOutputStream

Learn Java in-depth with real-world projects through our Java certification course. Enroll and become a certified expert to boost your career.

Constructors

Sr.No.Constructor & Description
1CheckedOutputStream(OutputStream out, Checksum cksum)Creates an output stream with the specified Checksum.

Class Methods

Sr.No.Method & Description
1Checksum getChecksum()Returns the Checksum for this output stream.
2void write(byte[] b, int off, int len)Writes an array of bytes.
3void write(int b)Writes a byte.

Methods Inherited

This class inherits methods from the following classes −

  • java.io.FilterOutputStream
  • java.lang.Object

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *