Class CRCUtil
java.lang.Object
com.inductiveautomation.ignition.common.util.CRCUtil
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic longcalcCRC(byte[] arr) Calculates a CRC for the byte array.static longCalculates the CRC of a file.static <T> longcrc(Collection<T> items) This is a convenience method that will use whatever T.hashCode() happens to be as the hash code.static <T> longcrc(Collection<T> items, CRCUtil.HashCoder<T> hashCoder) Calculates a reliably unique code for a given Collection<T> that is indifferent to the collections lack of order.
- 
Constructor Details- 
CRCUtilpublic CRCUtil()
 
- 
- 
Method Details- 
calcCRCpublic static long calcCRC(byte[] arr) Calculates a CRC for the byte array. If the array is null or has length==0, returns 0.
- 
calcCRCCalculates the CRC of a file. Avoids loading the whole file into memory- Throws:
- IOException
 
- 
crcThis is a convenience method that will use whatever T.hashCode() happens to be as the hash code.- See Also:
 
- 
crcCalculates a reliably unique code for a given Collection<T> that is indifferent to the collections lack of order.- Parameters:
- items- The Collection<T> you want a CRC for.
- hashCoder- The HashCoder that provides a hashCode for an object of T.
- Returns:
- A CRC for the given Collection<T>.
 
 
-