public class Checksum
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Checksum.Algorithm
The hash algorithm to use.
|
| Constructor and Description |
|---|
Checksum(Checksum.Algorithm alg) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAlgorithmName() |
java.lang.String |
getExpectedValue()
Gets the expected value for this checksum.
|
void |
setExpectedValue(java.lang.String expectedValue)
Sets the expected value for this checksum.
|
java.lang.String |
toString()
Outputs the current digest checksum in a format
suitable for including in Atmos create/update calls.
|
void |
update(byte[] buffer,
int offset,
int length)
Updates the checksum with the given buffer's contents
|
public Checksum(Checksum.Algorithm alg) throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmExceptionpublic java.lang.String getAlgorithmName()
public void update(byte[] buffer,
int offset,
int length)
buffer - data to updateoffset - start in bufferlength - number of bytes to use from buffer starting at offsetpublic java.lang.String toString()
toString in class java.lang.Objectpublic void setExpectedValue(java.lang.String expectedValue)
expectedValue - the expectedValue to setpublic java.lang.String getExpectedValue()