public final class MetadataReader
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<java.util.AbstractMap.SimpleImmutableEntry<java.lang.String,java.lang.String>> |
readBagMetadata(java.nio.file.Path rootDir,
java.nio.charset.Charset encoding)
Reads the bag metadata file (bag-info.txt or package-info.txt) and returns it.
|
public static java.util.List<java.util.AbstractMap.SimpleImmutableEntry<java.lang.String,java.lang.String>> readBagMetadata(java.nio.file.Path rootDir,
java.nio.charset.Charset encoding)
throws java.io.IOException,
InvalidBagMetadataException
rootDir - the root directory of the bagencoding - the encoding of the bagit.txt filejava.io.IOException - if there is a problem reading a fileInvalidBagMetadataException - if the metadata file does not conform to the bagit spec