public final class ManifestReader
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static Manifest |
readManifest(BagitAlgorithmNameToSupportedAlgorithmMapping nameMapping,
java.nio.file.Path manifestFile,
java.nio.file.Path bagRootDir,
java.nio.charset.Charset charset)
Reads a manifest file and converts it to a
Manifest object. |
public static Manifest readManifest(BagitAlgorithmNameToSupportedAlgorithmMapping nameMapping, java.nio.file.Path manifestFile, java.nio.file.Path bagRootDir, java.nio.charset.Charset charset) throws java.io.IOException, MaliciousPathException, UnsupportedAlgorithmException, InvalidBagitFileFormatException
Manifest object.nameMapping - a map between BagIt algorithm names and MessageDigest namesmanifestFile - a specific manifest filebagRootDir - the root directory of the bagcharset - the encoding to use when reading the manifest filejava.io.IOException - if there is a problem reading a fileMaliciousPathException - if there is path that is referenced in the manifest that is outside the bag root directoryUnsupportedAlgorithmException - if the manifest uses a algorithm that isn't supportedInvalidBagitFileFormatException - if the manifest is not formatted properly