Class BagitFileWriter

java.lang.Object
nl.knaw.dans.bagit.writer.BagitFileWriter

public final class BagitFileWriter extends Object
Responsible for writing the bagit.txt to the filesystem
  • Field Details

    • logger

      private static final org.slf4j.Logger logger
    • messages

      private static final ResourceBundle messages
  • Constructor Details

    • BagitFileWriter

      private BagitFileWriter()
  • Method Details

    • writeBagitFile

      public static void writeBagitFile(Version version, Charset encoding, Path outputDir) throws IOException
      Write the bagit.txt file in required UTF-8 encoding.
      Parameters:
      version - the version of the bag to write out
      encoding - the encoding of the tag files
      outputDir - the root of the bag
      Throws:
      IOException - if there was a problem writing the file