public class CheckedOutputStream extends java.io.FilterOutputStream
Checksum| Constructor and Description |
|---|
CheckedOutputStream(java.io.OutputStream out,
Checksum cksum)
Creates a new CheckInputStream on top of the supplied OutputStream
using the supplied Checksum.
|
| Modifier and Type | Method and Description |
|---|---|
Checksum |
getChecksum()
Returns the Checksum object used.
|
void |
write(byte[] buf,
int off,
int len)
Writes the byte array to the OutputStream and updates the Checksum.
|
void |
write(int bval)
Writes one byte to the OutputStream and updates the Checksum.
|
public CheckedOutputStream(java.io.OutputStream out, Checksum cksum)
public Checksum getChecksum()
getChecksum.getValue().public void write(int bval) throws java.io.IOException
write in class java.io.FilterOutputStreambval - The byte to write, passed as an int.java.io.IOException - If an error occurspublic void write(byte[] buf, int off, int len) throws java.io.IOException
write in class java.io.FilterOutputStreambuf - The byte array to write bytes fromoff - The index into the array to start writing bytes fromlen - The number of bytes to writejava.io.IOException - If an error occurs