java.util.zip.CheckedOutputStream
java.io.FilterOutputStream
None
None
New as of JDK 1.1
The CheckOutputStream class represents an OutputStream with an associated checksum. In other words, a CheckedOutputStream wraps a regular output stream and computes a checksum value as data is written to the stream. The checksum can verify the integrity of the data. When you create a CheckedOutputStream, you must specify an object that implements the Checksum interface that computes the checksum.
public class java.util.zip.CheckedOutputStream extends java.io.FilterOutputStream { // Constructors public CheckedOutputStream(OutputStream out, Checksum cksum); // Instance Methods public Checksum getChecksum(); public void write(int b); public void write(byte[] b, int off, int len); }
The underlying output stream.
The checksum object.
This constructor creates a CheckedOutputStream that writes data to the given OutputStream and updates the given Checksum.
The Checksum associated with this output stream.
This method returns the Checksum object associated with this output stream.
The value to write.
If any kind of I/O error occurs.
FilterOutputStream.write(int)
This method writes a byte that contains the lowest eight bits of the given integer value to the underlying OutputStream and then updates the checksum.
An array of bytes to write to the stream.
An offset into the byte array.
The number of bytes to write.
If any kind of I/O error occurs.
FilterOutputStream.write(byte[], int, int)
This method writes len bytes to the underlying OutputStream from the given array, starting at off. The checksum is then updated with the data that has been written.
Method |
Inherited From |
Method |
Inherited From |
---|---|---|---|
clone() |
Object |
close() |
FilterOutputStream |
equals(Object) |
Object |
finalize() |
Object |
flush() |
FilterOutputStream |
getClass() |
Object |
hashCode() |
Object |
notify() |
Object |
notifyAll() |
Object |
toString() |
Object |
wait() |
Object |
wait(long) |
Object |
wait(long, int) |
Object |
write(byte[]) |
FilterOutputStream |
Checksum, FilterOutputStream, IOException, OutputStream
This HTML Help has been published using the chm2web software. |