|
Java™ Platform Standard Ed. 6 |
|||||||||
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
public class 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()
|
Java™ Platform Standard Ed. 6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1993, 2010, Oracle and/or its affiliates. All rights reserved.