public class HasherOutputStream extends FilterOutputStream
OutputStream
which appends the hash of the data written to it to a Hasher
. As
opposed to HashingOutputStream
, users can wrap an existing Hasher
which makes this more flexible when building more complex hashes.out
Constructor and Description |
---|
HasherOutputStream(com.google.common.hash.Hasher hasher,
OutputStream out) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
write(byte[] bytes,
int off,
int len) |
void |
write(int b) |
flush, write
public HasherOutputStream(com.google.common.hash.Hasher hasher, OutputStream out)
public void write(int b) throws IOException
write
in class FilterOutputStream
IOException
public void write(@Nonnull byte[] bytes, int off, int len) throws IOException
write
in class FilterOutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterOutputStream
IOException