private void finish() {
String referenceValue = referenceChecksum.getValue();
String calculatedValue = runningChecksum.getValue();
if (!referenceValue.equals(calculatedValue))
throw new ChecksumError("Checksum failure while reading stream", referenceValue, calculatedValue);
}