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, writepublic HasherOutputStream(com.google.common.hash.Hasher hasher,
OutputStream out)
public void write(int b)
throws IOException
write in class FilterOutputStreamIOExceptionpublic void write(@Nonnull byte[] bytes, int off, int len) throws IOException
write in class FilterOutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterOutputStreamIOException