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, toString
public RunningChecksum(ChecksumAlgorithm algorithm) throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
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 void update(BufferSegment segment)
public ChecksumAlgorithm getAlgorithm()
getAlgorithm
in class ChecksumValue
public long getOffset()
getOffset
in class ChecksumValue
public java.lang.String getValue()
getValue
in class ChecksumValue