@Beta public final class HashingOutputStream extends FilterOutputStream
OutputStream that maintains a hash of the data written to it.out| Constructor and Description |
|---|
HashingOutputStream(HashFunction hashFunction,
OutputStream out)
Creates an output stream that hashes using the given
HashFunction, and forwards all
data written to it to the underlying OutputStream. |
public HashingOutputStream(HashFunction hashFunction, OutputStream out)
HashFunction, and forwards all
data written to it to the underlying OutputStream.
The OutputStream should not be written to before or after the hand-off.
public void write(int b) throws IOException
write in class FilterOutputStreamIOExceptionpublic void write(byte[] bytes, int off, int len) throws IOException
write in class FilterOutputStreamIOExceptionCopyright © 2010-2014. All Rights Reserved.