Spec-Zone .ru
спецификации, руководства, описания, API
|
|
Java™ Platform Standard Ed. 7 DRAFT ea-b118 |
|||||||||
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 extends FilterOutputStream
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
Modifier and Type | Field and Description |
---|
Fields inherited from class java.io.FilterOutputStream |
---|
out |
Constructor and Description |
---|
CheckedOutputStream(OutputStream out,
Checksum cksum)
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. |
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 writtenIOException
- 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 writtenIOException
- if an I/O error has occurredFilterOutputStream.write(int)
public Checksum getChecksum()
|
Java™ Platform Standard Ed. 7 DRAFT ea-b118 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1993, 2010, Oracle Corporation. All rights reserved.