Package nl.siegmann.epublib.epub
Class EpubProcessorSupport
- java.lang.Object
-
- nl.siegmann.epublib.epub.EpubProcessorSupport
-
public class EpubProcessorSupport extends java.lang.ObjectVarious low-level support methods for reading/writing epubs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classEpubProcessorSupport.EntityResolverImpl
-
Field Summary
Fields Modifier and Type Field Description protected static javax.xml.parsers.DocumentBuilderFactorydocumentBuilderFactoryprivate static org.slf4j.Loggerlog
-
Constructor Summary
Constructors Constructor Description EpubProcessorSupport()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static javax.xml.parsers.DocumentBuildercreateDocumentBuilder()Creates a DocumentBuilder that looks up dtd's and schema's from epublib's classpath.static org.xmlpull.v1.XmlSerializercreateXmlSerializer(java.io.OutputStream out)static org.xmlpull.v1.XmlSerializercreateXmlSerializer(java.io.Writer out)javax.xml.parsers.DocumentBuilderFactorygetDocumentBuilderFactory()static org.xml.sax.EntityResolvergetEntityResolver()Gets an EntityResolver that loads dtd's and such from the epublib classpath.private static voidinit()
-
-
-
Method Detail
-
init
private static void init()
-
createXmlSerializer
public static org.xmlpull.v1.XmlSerializer createXmlSerializer(java.io.OutputStream out) throws java.io.UnsupportedEncodingException- Throws:
java.io.UnsupportedEncodingException
-
createXmlSerializer
public static org.xmlpull.v1.XmlSerializer createXmlSerializer(java.io.Writer out)
-
getEntityResolver
public static org.xml.sax.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 javax.xml.parsers.DocumentBuilderFactory getDocumentBuilderFactory()
-
createDocumentBuilder
public static javax.xml.parsers.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.
-
-