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
Modifier and TypeFieldDescriptionprivate final String
private final Collection<Exception>
private final CountDownLatch
private static final org.slf4j.Logger
private static final ResourceBundle
-
Constructor Summary
ConstructorDescriptionCheckManifestHashesTask
(Map.Entry<Path, String> entry, String algorithm, CountDownLatch latch, Collection<Exception> exceptions) -
Method Summary
Modifier and TypeMethodDescriptionprotected static void
checkManifestEntry
(Map.Entry<Path, String> entry, MessageDigest messageDigest, String algorithm) void
run()
-
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:
IOException
CorruptChecksumException
-