Package org.jacoco.core.internal.data
Class CRC64
- java.lang.Object
-
- org.jacoco.core.internal.data.CRC64
-
public final class CRC64 extends java.lang.ObjectCRC64 checksum calculator based on the polynom specified in ISO 3309. The implementation is based on the following publications:- http://en.wikipedia.org/wiki/Cyclic_redundancy_check
- http://www.geocities.com/SiliconValley/Pines/8659/crc.htm
-
-
Field Summary
Fields Modifier and Type Field Description private static long[]LOOKUPTABLEprivate static longPOLY64REV
-
Constructor Summary
Constructors Modifier Constructor Description privateCRC64()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longclassId(byte[] bytes)Calculates class identifier for the given class bytes.private static longupdate(long sum, byte b)Updates given checksum by given byte.private static longupdate(long sum, byte[] bytes, int fromIndexInclusive, int toIndexExclusive)Updates given checksum by bytes from given array.
-
-
-
Field Detail
-
POLY64REV
private static final long POLY64REV
- See Also:
- Constant Field Values
-
LOOKUPTABLE
private static final long[] LOOKUPTABLE
-
-
Method Detail
-
update
private static long update(long sum, byte b)Updates given checksum by given byte.- Parameters:
sum- initial checksum valueb- byte to update the checksum with- Returns:
- updated checksum value
-
update
private static long update(long sum, byte[] bytes, int fromIndexInclusive, int toIndexExclusive)Updates given checksum by bytes from given array.- Parameters:
sum- initial checksum valuebytes- byte array to update the checksum withfromIndexInclusive- start index in array, inclusivetoIndexExclusive- end index in array, exclusive- Returns:
- updated checksum value
-
classId
public static long classId(byte[] bytes)
Calculates class identifier for the given class bytes.- Parameters:
bytes- class bytes- Returns:
- class identifier
-
-