| Modifier and Type | Method and Description |
|---|---|
long |
getValue()
Returns the current calculated checksum value.
|
void |
reset()
Resets the checksum value applied before beginning calculations on a new
stream of data.
|
void |
update(byte[] buf,
int off,
int nbytes)
Updates the checksum with the given bytes.
|
void |
update(int val)
Updates the checksum value with the given byte.
|
long getValue()
void reset()
void update(byte[] buf,
int off,
int nbytes)
buf - the byte array from which to read the bytes.off - the initial position in buf to read the bytes from.nbytes - the number of bytes to read from buf.void update(int val)
val - the byte to update the checksum with.