Class EpubProcessorSupport

java.lang.Object
nl.siegmann.epublib.epub.EpubProcessorSupport

public class EpubProcessorSupport extends Object
Various low-level support methods for reading/writing epubs.
  • Field Details

    • log

      private static final org.slf4j.Logger log
    • documentBuilderFactory

      protected static DocumentBuilderFactory documentBuilderFactory
  • Constructor Details

    • EpubProcessorSupport

      public EpubProcessorSupport()
  • Method Details

    • init

      private static void init()
    • createXmlSerializer

      public static org.xmlpull.v1.XmlSerializer createXmlSerializer(OutputStream out) throws UnsupportedEncodingException
      Throws:
      UnsupportedEncodingException
    • createXmlSerializer

      public static org.xmlpull.v1.XmlSerializer createXmlSerializer(Writer out)
    • getEntityResolver

      public static EntityResolver getEntityResolver()
      Gets an EntityResolver that loads dtd's and such from the epublib classpath. In order to enable the loading of relative urls the given EntityResolver contains the previousLocation. Because of a new EntityResolver is created every time this method is called. Fortunately the EntityResolver created uses up very little memory per instance.
      Returns:
      an EntityResolver that loads dtd's and such from the epublib classpath.
    • getDocumentBuilderFactory

      public DocumentBuilderFactory getDocumentBuilderFactory()
    • createDocumentBuilder

      public static DocumentBuilder createDocumentBuilder()
      Creates a DocumentBuilder that looks up dtd's and schema's from epublib's classpath.
      Returns:
      a DocumentBuilder that looks up dtd's and schema's from epublib's classpath.