Class EPUBConverter

  • All Implemented Interfaces:
    Converter

    public final class EPUBConverter
    extends Xhtml11Converter
    This class converts an OpenDocument file to an EPUB document.
    • Constructor Detail

      • EPUBConverter

        public EPUBConverter()
    • Method Detail

      • convert

        public ConverterResult convert​(java.io.InputStream is,
                                       java.lang.String sTargetFileName)
                                throws java.io.IOException
        Description copied from interface: Converter
        Convert a document
        Specified by:
        convert in interface Converter
        Overrides:
        convert in class ConverterBase
        Parameters:
        is - an InputStream from which to read the source document.
        sTargetFileName - the file name to use for the converted document (if the converted document is a compound document consisting consisting of several files, this name will be used for the master document)
        Returns:
        a ConverterResult containing the converted document
        Throws:
        java.io.IOException - if some exception occurs while reading the document
      • convert

        public ConverterResult convert​(org.w3c.dom.Document dom,
                                       java.lang.String sTargetFileName,
                                       boolean bDestructive)
                                throws java.io.IOException
        Description copied from interface: Converter
        Convert a document
        Specified by:
        convert in interface Converter
        Overrides:
        convert in class ConverterBase
        Parameters:
        dom - a DOM tree representing the document as flat XML
        sTargetFileName - the file name to use for the converted document (if the converted document is a compound document consisting consisting of several files, this name will be used for the master document)
        bDestructive - set to true if the converter is allowed to remove contents from the DOM tree (to save memory)
        Returns:
        a ConverterResult containing the converted document
        Throws:
        java.io.IOException - if some exception occurs while reading the document