Package com.linkedin.alpini.base.hash
Class Crc32
- java.lang.Object
-
- com.linkedin.alpini.base.hash.Crc32
-
- All Implemented Interfaces:
java.util.zip.Checksum
public final class Crc32 extends java.lang.Object implements java.util.zip.Checksum
CRC32 algorithm as used by Deflate.
-
-
Constructor Summary
Constructors Constructor Description Crc32()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
crc32(int crc32, byte[] buf, int index, int len)
long
getValue()
void
reset()
void
update(byte[] b)
void
update(byte[] b, int off, int len)
void
update(int b)
-
-
-
Method Detail
-
crc32
public static int crc32(int crc32, @Nonnull byte[] buf, int index, int len)
-
update
public void update(int b)
- Specified by:
update
in interfacejava.util.zip.Checksum
-
update
public void update(byte[] b)
- Specified by:
update
in interfacejava.util.zip.Checksum
-
update
public void update(byte[] b, int off, int len)
- Specified by:
update
in interfacejava.util.zip.Checksum
-
getValue
public long getValue()
- Specified by:
getValue
in interfacejava.util.zip.Checksum
-
reset
public void reset()
- Specified by:
reset
in interfacejava.util.zip.Checksum
-
-