public class CheckedOutputStream extends FilterOutputStream
Checksum
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.
|
close, flush, write
public CheckedOutputStream(OutputStream out, Checksum cksum)
out
- the output streamcksum
- the checksumpublic 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()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2022, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.