Class EpubParser

java.lang.Object
com.attribyte.parser.epub.EpubParser

public class EpubParser extends Object
  • Field Details

    • supportedMimeTypes

      public static final com.google.common.collect.ImmutableSet<String> supportedMimeTypes
  • Constructor Details

    • EpubParser

      public EpubParser()
  • Method Details

    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception
    • parse

      public static List<EpubParser.EpubDocument> parse(File epubFile, File targetDir, Consumer<File> fileConsumer, boolean writeCombinedFile) throws IOException
      Parse an epub file.
      Parameters:
      epubFile - The file.
      targetDir - The target output directory.
      fileConsumer - If non-null, extracted files are reported to this function.
      writeCombinedFile - If specified, a new file is written to the directory containing the first linear file that combines all linear documents.
      Returns:
      The list of documents (each has metadata and a spine).
      Throws:
      IOException - on error.