Package com.webcodepro.shrinkit
Class CRC16
- java.lang.Object
-
- com.webcodepro.shrinkit.CRC16
-
- All Implemented Interfaces:
java.util.zip.Checksum
public class CRC16 extends java.lang.Object implements java.util.zip.Checksum
Crc16: Calculate 16-bit Cyclic Redundancy Check. License: GPL, incorporated by reference.
-
-
Constructor Summary
Constructors Constructor Description CRC16()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int[]
getTable()
long
getValue()
void
reset()
void
update(byte[] b)
Update 16-bit CRC.void
update(byte[] b, int off, int len)
Update 16-bit CRC.void
update(int b)
Update 16-bit CRC.
-
-
-
Method Detail
-
getTable
public static int[] getTable()
-
getValue
public long getValue()
- Specified by:
getValue
in interfacejava.util.zip.Checksum
-
reset
public void reset()
- Specified by:
reset
in interfacejava.util.zip.Checksum
-
update
public void update(int b)
Update 16-bit CRC.- Specified by:
update
in interfacejava.util.zip.Checksum
- Parameters:
b
- input byte
-
update
public void update(byte[] b)
Update 16-bit CRC.- Specified by:
update
in interfacejava.util.zip.Checksum
- Parameters:
b
- input byte array
-
update
public void update(byte[] b, int off, int len)
Update 16-bit CRC.- Specified by:
update
in interfacejava.util.zip.Checksum
- Parameters:
b
- input byte arrayoff
- starting offset to datalen
- number of bytes to process
-
-