Class CheckedOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
net.sf.jazzlib.CheckedOutputStream
- All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
OutputStream that computes a checksum of data being written using a supplied
Checksum object.
- See Also:
-
Field Summary
FieldsFields inherited from class FilterOutputStream
out -
Constructor Summary
ConstructorsConstructorDescriptionCheckedOutputStream(OutputStream out, Checksum cksum) Creates a new CheckInputStream on top of the supplied OutputStream using the supplied Checksum. -
Method Summary
Methods inherited from class FilterOutputStream
close, flush, writeMethods inherited from class OutputStream
nullOutputStream
-
Field Details
-
sum
The checksum object.
-
-
Constructor Details
-
CheckedOutputStream
Creates a new CheckInputStream on top of the supplied OutputStream using the supplied Checksum.
-
-
Method Details
-
getChecksum
Returns the Checksum object used. To get the data checksum computed so far callgetChecksum.getValue(). -
write
Writes one byte to the OutputStream and updates the Checksum.- Overrides:
writein classFilterOutputStream- Throws:
IOException
-
write
Writes the byte array to the OutputStream and updates the Checksum.- Overrides:
writein classFilterOutputStream- Throws:
IOException
-