CRC-32C is defined in RFC 3720: Internet Small Computer Systems Interface (iSCSI).
Passing a null
argument to a method in this class will cause a
NullPointerException
to be thrown.
Modifier and Type | Field and Description |
---|---|
private static final int[] | |
private static final int[] | |
private static final int[] | |
private static final int[] | |
private static final int[] | |
private static final int[] | |
private static final int[] | |
private static final int[] | |
private static final int[] | |
private static final int[][] | |
private int | crc
Calculated CRC-32C value |
private static final int | CRC32C_POLY
CRC-32C Polynomial |
private static final int | |
private static final Unsafe |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public long | |
public void | |
public void | update(int
the byte to update the checksum with b)Implements java. Updates the CRC-32C checksum with the specified byte (the low eight bits of the argument b). |
public void | update(byte[]
the byte array to update the checksum with b, int the start offset of the data off, int the number of bytes to use for the update len)Implements java. Updates the CRC-32C checksum with the specified array of bytes. |
public void | update(ByteBuffer
the ByteBuffer to update the checksum with buffer)Overrides default java. Updates the CRC-32C checksum with the bytes from the specified buffer. |
private static int | updateBytes(int crc, byte[] b, int off, int end)
Updates the CRC-32C checksum with the specified array of bytes. |
private static int | updateDirectByteBuffer(int crc, long address, int off, int end)
Updates the CRC-32C checksum reading from the specified address. |
byteTable | back to summary |
---|---|
private static final int[] byteTable |
byteTable0 | back to summary |
---|---|
private static final int[] byteTable0 |
byteTable1 | back to summary |
---|---|
private static final int[] byteTable1 |
byteTable2 | back to summary |
---|---|
private static final int[] byteTable2 |
byteTable3 | back to summary |
---|---|
private static final int[] byteTable3 |
byteTable4 | back to summary |
---|---|
private static final int[] byteTable4 |
byteTable5 | back to summary |
---|---|
private static final int[] byteTable5 |
byteTable6 | back to summary |
---|---|
private static final int[] byteTable6 |
byteTable7 | back to summary |
---|---|
private static final int[] byteTable7 |
byteTables | back to summary |
---|---|
private static final int[][] byteTables |
crc | back to summary |
---|---|
private int crc Calculated CRC-32C value |
CRC32C_POLY | back to summary |
---|---|
private static final int CRC32C_POLY CRC-32C Polynomial |
REVERSED_CRC32C_POLY | back to summary |
---|---|
private static final int REVERSED_CRC32C_POLY |
UNSAFE | back to summary |
---|---|
private static final Unsafe UNSAFE |
CRC32C | back to summary |
---|---|
public CRC32C() Creates a new CRC32C object. |
getValue | back to summary |
---|---|
public long getValue() Implements java. Returns CRC-32C value.
|
reset | back to summary |
---|---|
public void reset() Implements java. Resets CRC-32C to initial value.
|
update | back to summary |
---|---|
public void update(int b) Implements java. Updates the CRC-32C checksum with the specified byte (the low eight bits of the argument b).
|
update | back to summary |
---|---|
public void update(byte[] b, int off, int len) Implements java. Updates the CRC-32C checksum with the specified array of bytes.
|
update | back to summary |
---|---|
public void update(ByteBuffer buffer) Overrides default java. Updates the CRC-32C checksum with the bytes from the specified buffer. The checksum is updated with the remaining bytes in the buffer, starting at the buffer's position. Upon return, the buffer's position will be updated to its limit; its limit will not have been changed.
|
updateBytes | back to summary |
---|---|
private static int updateBytes(int crc, byte[] b, int off, int end) Updates the CRC-32C checksum with the specified array of bytes.
|
updateDirectByteBuffer | back to summary |
---|---|
private static int updateDirectByteBuffer(int crc, long address, int off, int end) Updates the CRC-32C checksum reading from the specified address.
|