public final class ChecksumUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static int |
checksum(byte[] bytes) |
static int |
checksum(java.nio.ByteBuffer buffer) |
static void |
validateChecksum(java.nio.ByteBuffer buffer)
Checks the last 4 bytes of the buffer are the the Jenkins Lookup 3 Checksum of the rest of the buffer.
|
public static void validateChecksum(java.nio.ByteBuffer buffer)
buffer
- the buffer to checkHdfChecksumMismatchException
- if the checksum is incorrect.public static int checksum(java.nio.ByteBuffer buffer)
public static int checksum(byte[] bytes)