Interface UnixFSChecksumAlgorithm.Checkable
- All Known Implementing Classes:
UnixFSDataHeader
- Enclosing class:
UnixFSChecksumAlgorithm
public static interface UnixFSChecksumAlgorithm.Checkable
Defines a Checksum-able
Struct type.-
Method Summary
Modifier and TypeMethodDescriptionjavolution.io.Struct.Unsigned32checksum()Returns the member of the struct containing the checksum.default ByteBufferReturns aByteBufferof theStruct's contents positioned appropriately for the the algorithm.
-
Method Details
-
checksum
javolution.io.Struct.Unsigned32 checksum()Returns the member of the struct containing the checksum. Calculation presumes that for verification this member will be set to zero before calculating the checksum, and that this value will be skipped when verifying the checksum. Additionally, the checker and validator both assume that this member falls somewhere inside theByteBufferreturned bycontentsToCheck().- Returns:
- the checksum member
-
contentsToCheck
Returns aByteBufferof theStruct's contents positioned appropriately for the the algorithm. The returned value must have the position and limit set appropriately to perform the checksum calculation. The position must be the beginning of theStructand the limit must be set to the final region of data to check (which may exceed the size of theStruct).- Returns:
- the
ByteBuffer
-