OutputStream that maintains a hash of the data written to it.
| Modifier and Type | Field and Description |
|---|---|
| private final Hasher |
| Access | Constructor and Description |
|---|---|
| public | HashingOutputStream(HashFunction hashFunction, OutputStream out)
Creates an output stream that hashes using the given |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides java. Implements java. |
| public HashCode | |
| public void | write(int
the b)byte.Overrides java. byte to this output stream.
|
| public void | write(byte[]
the data. bytes, int the start offset in the data. off, int the number of bytes to write. len)Overrides java. len bytes from the specified
byte array starting at offset off to
this output stream.
|
| hasher | back to summary |
|---|---|
| private final Hasher hasher | |
| HashingOutputStream | back to summary |
|---|---|
| public HashingOutputStream(HashFunction hashFunction, OutputStream out) Creates an output stream that hashes using the given The | |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this output stream and releases any system resources associated with the stream.
| |
| hash | back to summary |
|---|---|
| public HashCode hash() Returns the | |
| write | back to summary |
|---|---|
| public void write(int b) throws IOException Overrides java. Doc from java. Writes the specified
The
Implements the abstract
| |
| write | back to summary |
|---|---|
| public void write(byte[] bytes, int off, int len) throws IOException Overrides java. Doc from java. Writes
| |