java.util.zip
public
class
java.util.zip.CheckedOutputStream
The CheckedOutputStream class is used to maintain a running Checksum of all
data written to a stream.
Summary
Public Constructors
Public Methods
|
|
|
|
|
void |
close() |
|
|
|
|
|
void |
flush() |
|
|
|
|
|
void |
write(byte[] buffer) |
abstract |
|
|
|
|
void |
write(int oneByte) |
|
|
|
|
|
void |
write(byte[] buffer, int offset, int count) |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
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 |
cs
| Type of Checksum to calculate
|
Public Methods
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. The Checksum is updated
with val.
Parameters
val
| Value of the byte to write out |
public
void
write(byte[] buf, int off, int nbytes)
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 |
off
| the start offset of the data |
nbytes
| number of bytes to write out |