Package writer2latex.epub
Class EPUBWriter
java.lang.Object
writer2latex.epub.EPUBWriter
- All Implemented Interfaces:
OutputFile
This class repackages an XHTML document into EPUB format.
Some filenames are hard wired in this implementation: The main directory is OEBPS and
the OPF and NCX files are book.opf and book.ncx respectively; finally the EPUB 3 navigation
document is nav.xhtml
-
Constructor Summary
ConstructorsConstructorDescriptionEPUBWriter(ConverterResult xhtmlResult, String sFileName, int nVersion, XhtmlConfig config) Create a newEPUBWriterbased on aConverterResult. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTest whether this document contains mathematical formulasReturns the file name of theOutputFile.Get the MIME type of theOutputFile.booleanTest whether this document is part of the main document flow (master documents) or an auxiliary documentvoidwrite(OutputStream os) Writes theOutputFileto anOutputStream.
-
Constructor Details
-
EPUBWriter
Create a newEPUBWriterbased on aConverterResult.- Parameters:
xhtmlResult- the converter result to repackagesFileName- the file name to use for the resultnVersion- the EPUB version number. Can be either 2 or 3, other values are interpreted as 2.config- the configuration to use
-
-
Method Details
-
getFileName
Description copied from interface:OutputFileReturns the file name of theOutputFile. This includes the file extension and may also include a relative path, always using / as separator.- Specified by:
getFileNamein interfaceOutputFile- Returns:
- the file name of this
OutputFile
-
getMIMEType
Description copied from interface:OutputFileGet the MIME type of theOutputFile.- Specified by:
getMIMETypein interfaceOutputFile- Returns:
- string representation of the MIME type
-
isMasterDocument
public boolean isMasterDocument()Description copied from interface:OutputFileTest whether this document is part of the main document flow (master documents) or an auxiliary document- Specified by:
isMasterDocumentin interfaceOutputFile- Returns:
- true if this document is a master document
-
containsMath
public boolean containsMath()Description copied from interface:OutputFileTest whether this document contains mathematical formulas- Specified by:
containsMathin interfaceOutputFile- Returns:
- true if the document contains formulas
-
write
Description copied from interface:OutputFileWrites theOutputFileto anOutputStream.- Specified by:
writein interfaceOutputFile- Parameters:
os-OutputStreamto which the content should be written- Throws:
IOException- if any I/O error occurs
-