Checksum
public final class CRC32C extends Object implements Checksum
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.
Constructor | Description |
---|---|
CRC32C() |
Creates a new CRC32C object.
|
Modifier and Type | Method | Description |
---|---|---|
long |
getValue() |
Returns CRC-32C value.
|
void |
reset() |
Resets CRC-32C to initial value.
|
void |
update(byte[] b,
int off,
int len) |
Updates the CRC-32C checksum with the specified array of bytes.
|
void |
update(int b) |
Updates the CRC-32C checksum with the specified byte (the low eight bits
of the argument b).
|
void |
update(ByteBuffer buffer) |
Updates the CRC-32C checksum with the bytes from the specified buffer.
|
public void update(int b)
public void update(byte[] b, int off, int len)
update
in interface Checksum
b
- the byte array to update the checksum withoff
- the start offset of the datalen
- the number of bytes to use for the updateArrayIndexOutOfBoundsException
- if off
is negative, or len
is negative, or
off+len
is negative or greater than the length of
the array b
.public void update(ByteBuffer buffer)
public void reset()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-internal+0-adhoc.mlchung.jdk9-jdeps