Package org.apache.commons.codec.digest
Class Crc16.Builder
java.lang.Object
org.apache.commons.codec.digest.Crc16.Builder
- Enclosing class:
- Crc16
Builds
Crc16 instances.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()Creates a newCrc16instance.setInit(int init) Sets the initial value.setTable(int[] table) Sets the lookup table.setXorOut(int xorOut) Sets the XorOut value to XOR to the current checksum returned byCrc16.getValue().private Crc16.Buildertable(int[] table) Sets the lookup table without making a clone.
-
Field Details
-
init
private int init -
table
private int[] table -
xorOut
private int xorOut
-
-
Constructor Details
-
Builder
public Builder()Constructs a new instance.
-
-
Method Details
-
get
Creates a newCrc16instance. -
setInit
Sets the initial value.- Parameters:
init- the initial value.- Returns:
thisinstance.
-
setTable
Sets the lookup table.- Parameters:
table- the lookup table, making a clone of the input array, must not be null.- Returns:
thisinstance.
-
setXorOut
Sets the XorOut value to XOR to the current checksum returned byCrc16.getValue().- Parameters:
xorOut- the XorOut value.- Returns:
thisinstance.
-
table
Sets the lookup table without making a clone.- Parameters:
table- the lookup table, must not be null.- Returns:
thisinstance.
-