public class RpcCRC32Checksum
extends java.util.zip.CRC32
This avoids the basic Java CRC32's JNI overhead for certain uses of checksumming where many small pieces of data are checksummed in succession.
Constructor and Description |
---|
RpcCRC32Checksum()
Creates a new RpcCRC32Checksum object.
|
Modifier and Type | Method and Description |
---|---|
long |
getValue()
Returns CRC-32 value.
|
void |
reset()
Resets Rpc CRC-32 to initial value.
|
void |
update(byte[] b)
Updates the Rpc CRC-32 checksum with the specified array of bytes.
|
void |
update(byte[] b,
int off,
int len)
Updates the Rpc CRC-32 checksum with the specified array of bytes.
|
void |
update(int b)
Updates the Rpc CRC-32 checksum with the specified byte (the low
eight bits of the argument b).
|
public RpcCRC32Checksum()
public void update(int b)
update
in interface java.util.zip.Checksum
update
in class java.util.zip.CRC32
b
- the byte to update the checksum withpublic void update(byte[] b, int off, int len)
update
in interface java.util.zip.Checksum
update
in class java.util.zip.CRC32
public void update(byte[] b)
update
in class java.util.zip.CRC32
b
- the array of bytes to update the checksum withpublic void reset()
reset
in interface java.util.zip.Checksum
reset
in class java.util.zip.CRC32
public long getValue()
getValue
in interface java.util.zip.Checksum
getValue
in class java.util.zip.CRC32