public final class KeyValueReader
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<java.util.AbstractMap.SimpleImmutableEntry<java.lang.String,java.lang.String>> |
readKeyValuesFromFile(java.nio.file.Path file,
java.lang.String splitRegex,
java.nio.charset.Charset charset)
Generic method to read key value pairs from the bagit files, like bagit.txt or bag-info.txt
|
public static java.util.List<java.util.AbstractMap.SimpleImmutableEntry<java.lang.String,java.lang.String>> readKeyValuesFromFile(java.nio.file.Path file,
java.lang.String splitRegex,
java.nio.charset.Charset charset)
throws java.io.IOException,
InvalidBagMetadataException
file - the file to readsplitRegex - how to split the key from the valuecharset - the encoding of the filejava.io.IOException - if there was a problem reading the fileInvalidBagMetadataException - if the file does not conform to pattern of key value