| Modifier and Type | Field | Description |
|---|---|---|
protected long |
length |
|
protected long |
value |
The crc data checksum so far.
|
| Constructor | Description |
|---|---|
Checksum() |
Creates an AbstractChecksum.
|
| Modifier and Type | Method | 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.
|
boolean |
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.
|
boolean |
update(int data) |
Updates the checksum with the specified byte.
|
public void reset()
public boolean update(int data)
data - the bytepublic boolean 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()