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 booleanprivate 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) CheckManifestHashesTask(Map.Entry<Path, String> entry, String algorithm, CountDownLatch latch, Collection<Exception> exceptions, Map<Path, FetchItem> fetchItems, boolean holey) CheckManifestHashesTask(Map.Entry<Path, String> entry, String algorithm, CountDownLatch latch, Collection<Exception> exceptions, Map<Path, FetchItem> fetchItems, boolean holey, Map<String, String> extraHeaders) CheckManifestHashesTask(Map.Entry<Path, String> entry, String algorithm, CountDownLatch latch, Collection<Exception> exceptions, Map<Path, FetchItem> fetchItems, boolean holey, Map<String, String> extraHeaders, Map<String, Map<String, String>> urlConfigs) -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidcheckManifestEntry(Map.Entry<Path, String> entry, MessageDigest messageDigest, String algorithm) protected static voidcheckManifestEntry(Map.Entry<Path, String> entry, MessageDigest messageDigest, String algorithm, Map<Path, FetchItem> fetchItems, boolean allowHoley) protected static voidcheckManifestEntry(Map.Entry<Path, String> entry, MessageDigest messageDigest, String algorithm, Map<Path, FetchItem> fetchItems, boolean allowHoley, Map<String, String> extraHeaders) protected static voidcheckManifestEntry(Map.Entry<Path, String> entry, MessageDigest messageDigest, String algorithm, Map<Path, FetchItem> fetchItems, boolean allowHoley, Map<String, String> extraHeaders, Map<String, Map<String, String>> urlConfigs) voidrun()
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
messages
-
entry
-
latch
-
exceptions
-
algorithm
-
fetchItems
-
holey
private final transient boolean holey -
extraHeaders
-
urlConfigs
-
-
Constructor Details
-
CheckManifestHashesTask
public CheckManifestHashesTask(Map.Entry<Path, String> entry, String algorithm, CountDownLatch latch, Collection<Exception> exceptions) -
CheckManifestHashesTask
public CheckManifestHashesTask(Map.Entry<Path, String> entry, String algorithm, CountDownLatch latch, Collection<Exception> exceptions, Map<Path, FetchItem> fetchItems, boolean holey) -
CheckManifestHashesTask
-
CheckManifestHashesTask
-
-
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
-
checkManifestEntry
protected static void checkManifestEntry(Map.Entry<Path, String> entry, MessageDigest messageDigest, String algorithm, Map<Path, throws IOException, CorruptChecksumExceptionFetchItem> fetchItems, boolean allowHoley) - Throws:
IOExceptionCorruptChecksumException
-
checkManifestEntry
protected static void checkManifestEntry(Map.Entry<Path, String> entry, MessageDigest messageDigest, String algorithm, Map<Path, throws IOException, CorruptChecksumExceptionFetchItem> fetchItems, boolean allowHoley, Map<String, String> extraHeaders) - Throws:
IOExceptionCorruptChecksumException
-
checkManifestEntry
protected static void checkManifestEntry(Map.Entry<Path, String> entry, MessageDigest messageDigest, String algorithm, Map<Path, throws IOException, CorruptChecksumExceptionFetchItem> fetchItems, boolean allowHoley, Map<String, String> extraHeaders, Map<String, Map<String, String>> urlConfigs) - Throws:
IOExceptionCorruptChecksumException
-
mergeHeaders
-