Package nl.knaw.dans.bagit.verify
Class CheckManifestHashesTask
java.lang.Object
nl.knaw.dans.bagit.verify.CheckManifestHashesTask
- All Implemented Interfaces:
Runnable
Checks a give file to make sure the given checksum hash matches the computed checksum hash.
This is thread safe so you can call many at a time.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate final Collection<Exception>private final CountDownLatchprivate static final org.slf4j.Loggerprivate static final ResourceBundle -
Constructor Summary
ConstructorsConstructorDescriptionCheckManifestHashesTask(Map.Entry<Path, String> entry, String algorithm, CountDownLatch latch, Collection<Exception> exceptions) -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidcheckManifestEntry(Map.Entry<Path, String> entry, MessageDigest messageDigest, String algorithm) voidrun()
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
messages
-
entry
-
latch
-
exceptions
-
algorithm
-
-
Constructor Details
-
CheckManifestHashesTask
public CheckManifestHashesTask(Map.Entry<Path, String> entry, String algorithm, CountDownLatch latch, Collection<Exception> exceptions)
-
-
Method Details
-
run
public void run() -
checkManifestEntry
protected static void checkManifestEntry(Map.Entry<Path, String> entry, MessageDigest messageDigest, String algorithm) throws IOException, CorruptChecksumException- Throws:
IOExceptionCorruptChecksumException
-