|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.OutputStream | +--java.io.FilterOutputStream | +--java.util.zip.CheckedOutputStream
An output stream that also maintains a checksum of the data being written. The checksum can then be used to verify the integrity of the output data.
Checksum
Field Summary |
Fields inherited from class java.io.FilterOutputStream |
out |
Constructor Summary | |
CheckedOutputStream(OutputStream out,
Checksum cksum)
Creates an output stream with the specified Checksum. |
Method Summary | |
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. |
Methods inherited from class java.io.FilterOutputStream |
close, flush, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CheckedOutputStream(OutputStream out, Checksum cksum)
out
- the output streamcksum
- the checksumMethod Detail |
public void write(int b) throws IOException
write
in class FilterOutputStream
b
- the byte to be written
IOException
- if an I/O error has occurredpublic void write(byte[] b, int off, int len) throws IOException
write
in class FilterOutputStream
b
- the data to be writtenoff
- the start offset of the datalen
- the number of bytes to be written
IOException
- if an I/O error has occurredFilterOutputStream.write(int)
public Checksum getChecksum()
|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.