Class PEFFileMerger

java.lang.Object
org.daisy.braille.pef.PEFFileMerger

public class PEFFileMerger extends Object
Merges several single volume PEF-files into one. Metadata is collected from the first file. The order of the files is determined by the file names. Two sorting algorithms are used:
  1. standard, which sorts character by character in strict alphabetical order
  2. numeral grouping, which sorts groups of digits as numbers at the position in the string where they occur.
Author:
Joel HÃ¥kansson
  • Constructor Details

    • PEFFileMerger

      public PEFFileMerger()
      Creates a new PEFFileMerger
  • Method Details

    • merge

      public boolean merge(File input, OutputStream os, String identifier, PEFFileMerger.SortType sort)
      Merges several PEF-files into one.
      Parameters:
      input - input directory
      os - output file
      identifier - identifier of the new publication
      sort - sort type
      Returns:
      returns true if merge was successful, false otherwise