public class GridfourCRC32C extends Object
The CRC-32C is defined in
RFC 3720: Internet Small Computer Systems Interface (iSCSI).
As of Java 9, the standard Java API provides an implementation of the Java CRC32C. This implementation is included in Gridfour only because Gridfour is intended to support Java 8. If you have the option of operating exclusively in Java 9 or above, you will obtain substantially better performance from the standard API.
Constructor and Description |
---|
GridfourCRC32C() |
Modifier and Type | Method and Description |
---|---|
long |
getValue()
Returns the CRC-32C value
|
void |
reset()
Reset the CRC-32C to initial value
|
void |
update(byte[] b)
Updates the CRC-32C checksum with the specified array of bytes
|
void |
update(byte[] b,
int off,
int len)
Updates the CRC-32C checksum with the specified array of bytes
|
public void update(byte[] b, int off, int len)
b
- a valid array of bytesoff
- the starting position within the array of byteslen
- the number of bytes to be read from the arraypublic void update(byte[] b)
b
- a valid array of bytespublic long getValue()
public void reset()
Copyright © 2022. All rights reserved.