public class EPUBWriter extends java.lang.Object implements OutputFile
Constructor and Description |
---|
EPUBWriter(ConverterResult xhtmlResult,
java.lang.String sFileName,
int nVersion,
XhtmlConfig config)
Create a new
EPUBWriter based on a ConverterResult . |
Modifier and Type | Method and Description |
---|---|
boolean |
containsMath()
Test whether this document contains mathematical formulas
|
java.lang.String |
getFileName()
Returns the file name of the
OutputFile . |
java.lang.String |
getMIMEType()
Get the MIME type of the
OutputFile . |
boolean |
isMasterDocument()
Test whether this document is part of the main document flow (master documents) or
an auxiliary document
|
void |
write(java.io.OutputStream os)
Writes the
OutputFile to an OutputStream . |
public EPUBWriter(ConverterResult xhtmlResult, java.lang.String sFileName, int nVersion, XhtmlConfig config)
EPUBWriter
based on a ConverterResult
.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 usepublic java.lang.String getFileName()
OutputFile
OutputFile
. This includes
the file extension and may also include a relative path, always using
/ as separator.getFileName
in interface OutputFile
OutputFile
public java.lang.String getMIMEType()
OutputFile
OutputFile
.getMIMEType
in interface OutputFile
public boolean isMasterDocument()
OutputFile
isMasterDocument
in interface OutputFile
public boolean containsMath()
OutputFile
containsMath
in interface OutputFile
public void write(java.io.OutputStream os) throws java.io.IOException
OutputFile
OutputFile
to an OutputStream
.write
in interface OutputFile
os
- OutputStream
to which the content should be writtenjava.io.IOException
- if any I/O error occurs