checkFooter
Validates the codec footer previously written by .writeFooter.
Return
actual checksum value
Throws
IOException
if the footer is invalid, if the checksum does not match, or if in is not properly positioned before the footer at the end of the stream.
Validates the codec footer previously written by .writeFooter, optionally passing an unexpected exception that has already occurred.
When a priorException is provided, this method will add a suppressed exception indicating whether the checksum for the stream passes, fails, or cannot be computed, and rethrow it. Otherwise it behaves the same as .checkFooter.
Example usage:
try (ChecksumIndexInput input = ...) {
Throwable priorE = null;
try {
// ... read a bunch of stuff ...
} catch (Throwable exception) {
priorE = exception;
} finally {
CodecUtil.checkFooter(input, priorE);
}
}
*