public class CheckedOutputStream extends FilterOutputStream
Checksum
out| Constructor and Description |
|---|
CheckedOutputStream(OutputStream
Creates an output stream with the specified Checksum.
|
| Modifier and Type | Method and Description |
|---|---|
Checksum |
getChecksum()
Returns the Checksum for this output stream.
|
void |
write(byte[] b, int off, int len)
Writes an array of bytes.
|
void |
write(int b)
Writes a byte.
|
close, flush, writepublic CheckedOutputStream(OutputStreamout, Checksum cksum)
out - the output stream
cksum - the checksum
public void write(int b)
throws IOException
write in class
FilterOutputStream
b - the byte to be written
IOException - if an I/O error has occurred
public void write(byte[] b,
int off,
int len)
throws IOException
write in class
FilterOutputStream
b - the data to be written
off - the start offset of the data
len - the number of bytes to be written
IOException - if an I/O error has occurred
FilterOutputStream.write(int)
public ChecksumgetChecksum()