| java.lang.Object java.io.OutputStream java.io.FilterOutputStream java.util.zip.CheckedOutputStream
CheckedOutputStream | public class CheckedOutputStream extends java.io.FilterOutputStream (Code) | | The CheckedOutputStream class is used to maintain a running Checksum of all
data written to a stream.
|
Method Summary | |
public Checksum | getChecksum() Returns the Checksum calculated on the stream thus far. | public void | write(int val) Writes byte value val to the underlying stream. | public void | write(byte[] buf, int off, int nbytes) Writes nbytes of data from buf starting at offset off to the underlying
stream. |
CheckedOutputStream | public CheckedOutputStream(OutputStream os, Checksum cs)(Code) | | Constructs a new CheckedOutputStream on OutputStream os. The Checksum
will be calculated using the algorithm implemented by csum.
Parameters: os - OutputStream to calculate checksum from Parameters: cs - Type of Checksum to calculate |
getChecksum | public Checksum getChecksum()(Code) | | Returns the Checksum calculated on the stream thus far.
A java.util.zip.Checksum |
write | public void write(int val) throws IOException(Code) | | Writes byte value val to the underlying stream. The Checksum is updated
with val.
Parameters: val - Value of the byte to write out throws: IOException - if an IO error has occured |
write | public void write(byte[] buf, int off, int nbytes) throws IOException(Code) | | Writes nbytes of data from buf starting at offset off to the underlying
stream. The Checksum is updated with the bytes written.
Parameters: buf - data to write out Parameters: off - the start offset of the data Parameters: nbytes - number of bytes to write out throws: IOException - if an IO error has occured |
|
|