- CheckedOutputStream Class



The 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 class −

public class CheckedOutputStream
   extends FilterOutputStream


Sr.No. Constructor & Description

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 −

  • java.lang.Object