public class RunningChecksum extends ChecksumValue
| Constructor and Description |
|---|
RunningChecksum(ChecksumAlgorithm algorithm) |
| Modifier and Type | Method and Description |
|---|---|
ChecksumAlgorithm |
getAlgorithm() |
long |
getOffset() |
java.lang.String |
getValue() |
void |
update(BufferSegment segment)
Convenience method to pass in a buffer segment.
|
void |
update(byte[] buffer,
int offset,
int length)
Updates the checksum with the given buffer's contents
|
equals, hashCode, toString, toStringpublic RunningChecksum(ChecksumAlgorithm algorithm) throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmExceptionpublic 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 void update(BufferSegment segment)
public ChecksumAlgorithm getAlgorithm()
getAlgorithm in class ChecksumValuepublic long getOffset()
getOffset in class ChecksumValuepublic java.lang.String getValue()
getValue in class ChecksumValue