- All Superinterfaces:
CrcWidthAccessor
,org.refcodes.mixin.NameAccessor
- All Known Implementing Classes:
CrcAlgorithmImpl
,CrcStandard
This interfaces describes the methods which can be invoked upon working with
CRC checksums.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.numerical.CrcWidthAccessor
CrcWidthAccessor.CrcWidthBuilder<B extends CrcWidthAccessor.CrcWidthBuilder<B>>, CrcWidthAccessor.CrcWidthMutator, CrcWidthAccessor.CrcWidthProperty
Nested classes/interfaces inherited from interface org.refcodes.mixin.NameAccessor
org.refcodes.mixin.NameAccessor.NameBuilder<B extends org.refcodes.mixin.NameAccessor.NameBuilder<B>>, org.refcodes.mixin.NameAccessor.NameMutator, org.refcodes.mixin.NameAccessor.NameProperty
-
Method Summary
Modifier and TypeMethodDescriptionGets theCrcSize
class to which thisCrcAlgorithm
belongs.byte[]
toCrcBytes
(byte[] aData, int aOffset, int aLength, Endianess aEndianess) Calculates the according checksum from the supplied data data and returns the according byte array of the CRC checksum.byte[]
toCrcBytes
(byte[] aData, Endianess aEndianess) Calculates the according checksum from the supplied data data and returns the according byte array of the CRC checksum.byte[]
toCrcBytes
(byte aData, Endianess aEndianess) Calculates the according checksum from the supplied data and returns the according byte array of the CRC checksum.byte[]
toCrcBytes
(long aCrc, byte[] aData, int aOffset, int aLength, Endianess aEndianess) Updates the according checksum with he supplied data data and returns the according byte array of the CRC checksum.byte[]
toCrcBytes
(long aCrc, byte[] aData, Endianess aEndianess) Updates the according checksum with he supplied data data and returns the according byte array of the CRC checksum.byte[]
toCrcBytes
(long aCrc, byte aData, Endianess aEndianess) Updates the according checksum with he supplied data data and returns the according byte array of the CRC checksum.long
toCrcChecksum
(byte aData) Calculates the according checksum from the supplied data.long
toCrcChecksum
(byte[] aData) Calculates the according checksum from the supplied data.long
toCrcChecksum
(byte[] aData, int aOffset, int aLength) Calculates the according checksum from the supplied data.long
toCrcChecksum
(long aCrc, byte aData) Updates the according checksum with he supplied data.long
toCrcChecksum
(long aCrc, byte[] aData) Updates the according checksum with he supplied data.long
toCrcChecksum
(long aCrc, byte[] aData, int aOffset, int aLength) Updates the according checksum with he supplied data.Methods inherited from interface org.refcodes.numerical.CrcWidthAccessor
getCrcWidth
Methods inherited from interface org.refcodes.mixin.NameAccessor
getName
-
Method Details
-
getCrcSize
CrcSize getCrcSize()Gets theCrcSize
class to which thisCrcAlgorithm
belongs.- Returns:
- The
CrcSize
enumeration providing various width related methods.
-
toCrcChecksum
long toCrcChecksum(byte aData) Calculates the according checksum from the supplied data.- Parameters:
aData
- The data for which to calculate the checksum.- Returns:
- The according checksum.
-
toCrcChecksum
long toCrcChecksum(long aCrc, byte aData) Updates the according checksum with he supplied data.- Parameters:
aCrc
- The CRC checksum to be updated.aData
- The data for which to calculate the checksum.- Returns:
- The accordingly updated checksum.
-
toCrcChecksum
long toCrcChecksum(byte[] aData) Calculates the according checksum from the supplied data.- Parameters:
aData
- The data for which to calculate the checksum.- Returns:
- The according checksum.
-
toCrcChecksum
long toCrcChecksum(long aCrc, byte[] aData) Updates the according checksum with he supplied data.- Parameters:
aCrc
- The CRC checksum to be updated.aData
- The data for which to calculate the checksum.- Returns:
- The accordingly updated checksum.
-
toCrcChecksum
long toCrcChecksum(byte[] aData, int aOffset, int aLength) Calculates the according checksum from the supplied data.- Parameters:
aData
- The data for which to calculate the checksum.aOffset
- The offset from where to start.aLength
- The number of bytes to cover.- Returns:
- The according checksum.
-
toCrcChecksum
long toCrcChecksum(long aCrc, byte[] aData, int aOffset, int aLength) Updates the according checksum with he supplied data.- Parameters:
aCrc
- The CRC checksum to be updated.aData
- The data for which to calculate the checksum.aOffset
- The offset from where to start.aLength
- The number of bytes to cover.- Returns:
- The accordingly updated checksum.
-
toCrcBytes
Calculates the according checksum from the supplied data and returns the according byte array of the CRC checksum.- Parameters:
aData
- The data for which to calculate the checksum.aEndianess
- TheEndianess
(big endian or little endian) of the resulting bytes representing the CRC checksum.- Returns:
- The according checksum.
-
toCrcBytes
Updates the according checksum with he supplied data data and returns the according byte array of the CRC checksum.- Parameters:
aCrc
- The CRC checksum to be updated.aData
- The data for which to calculate the checksum.aEndianess
- TheEndianess
(big endian or little endian) of the resulting bytes representing the CRC checksum.- Returns:
- The accordingly updated checksum.
-
toCrcBytes
Calculates the according checksum from the supplied data data and returns the according byte array of the CRC checksum.- Parameters:
aData
- The data for which to calculate the checksum.aEndianess
- TheEndianess
(big endian or little endian) of the resulting bytes representing the CRC checksum.- Returns:
- The according checksum.
-
toCrcBytes
Updates the according checksum with he supplied data data and returns the according byte array of the CRC checksum.- Parameters:
aCrc
- The CRC checksum to be updated.aData
- The data for which to calculate the checksum.aEndianess
- TheEndianess
(big endian or little endian) of the resulting bytes representing the CRC checksum.- Returns:
- The accordingly updated checksum.
-
toCrcBytes
Calculates the according checksum from the supplied data data and returns the according byte array of the CRC checksum.- Parameters:
aData
- The data for which to calculate the checksum.aOffset
- The offset from where to start.aLength
- The number of bytes to cover.aEndianess
- TheEndianess
(big endian or little endian) of the resulting bytes representing the CRC checksum.- Returns:
- The according checksum.
-
toCrcBytes
Updates the according checksum with he supplied data data and returns the according byte array of the CRC checksum.- Parameters:
aCrc
- The CRC checksum to be updated.aData
- The data for which to calculate the checksum.aOffset
- The offset from where to start.aLength
- The number of bytes to cover.aEndianess
- TheEndianess
(big endian or little endian) of the resulting bytes representing the CRC checksum.- Returns:
- The accordingly updated checksum.
-