public class HasherInputStream extends FilterInputStream
InputStream
which appends the hash of the data read from it to a Hasher
. As
opposed to HashingInputStream
, users can wrap an existing Hasher
which makes this more flexible when building more complex hashes.in
Constructor and Description |
---|
HasherInputStream(com.google.common.hash.Hasher hasher,
InputStream in) |
Modifier and Type | Method and Description |
---|---|
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] bytes,
int off,
int len) |
void |
reset() |
available, close, read, skip
public HasherInputStream(com.google.common.hash.Hasher hasher, InputStream in)
public int read() throws IOException
read
in class FilterInputStream
IOException
public int read(@Nonnull byte[] bytes, int off, int len) throws IOException
read
in class FilterInputStream
IOException
public boolean markSupported()
markSupported
in class FilterInputStream
public void mark(int readlimit)
mark
in class FilterInputStream
public void reset() throws IOException
reset
in class FilterInputStream
IOException