public interface RollingChecksum extends Cloneable, Serializable
| Modifier and Type | Method and Description |
|---|---|
void |
check(byte[] buf,
int offset,
int length)
Replaces the current internal state with entirely new data.
|
Object |
clone()
Copies this checksum instance into a new instance.
|
boolean |
equals(Object o)
Tests if a particular checksum is equal to this checksum.
|
void |
first(byte[] buf,
int offset,
int length)
Replaces the current internal state with entirely new data.
|
int |
getValue()
Returns the currently-computed 32-bit checksum.
|
void |
reset()
Resets the internal state of the checksum, so it may be re-used
later.
|
void |
roll(byte b)
Update the checksum with a single byte.
|
int getValue()
void reset()
void roll(byte b)
b - The next byte.void check(byte[] buf,
int offset,
int length)
buf - The bytes to checksum.offset - The offset into buf to start reading.length - The number of bytes to update.void first(byte[] buf,
int offset,
int length)
buf - The bytes to checksum.offset - The offset into buf to start reading.length - The number of bytes to update.Object clone()
Cloneable interface.boolean equals(Object o)
Copyright © 2021 McEvoy Software Ltd. All rights reserved.