| Modifier and Type | Field and Description |
|---|---|
protected long |
length |
protected long |
value
The crc data checksum so far.
|
| Constructor and Description |
|---|
Checksum()
Creates an AbstractChecksum.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getByteArray()
Returns the result of the computation as byte array.
|
long |
getLength()
Returns the length of the processed bytes.
|
abstract int |
getOrder() |
long |
getValue()
Returns the value of the checksum.
|
void |
reset()
Resets the checksum to its initial value for further use.
|
void |
update(byte b)
Updates the checksum with the specified byte.
|
void |
update(byte[] bytes)
Updates the current checksum with the specified array of bytes.
|
void |
update(byte[] bytes,
int offset,
int length)
Updates the current checksum with the specified array of bytes.
|
void |
update(int b)
Updates the checksum with the specified byte.
|
public void reset()
public void update(int b)
b - the bytepublic void update(byte b)
b - the item to updatepublic void update(byte[] bytes,
int offset,
int length)
bytes - the byte array to update the checksum withoffset - the start offset of the datalength - the number of bytes to use for the updatepublic void update(byte[] bytes)
bytes - bytearray of itemspublic long getValue()
getByteArray()public long getLength()
public byte[] getByteArray()
public abstract int getOrder()