Class EpubWriter


  • public class EpubWriter
    extends Object
    The EpubWriter creates the EPUB zip bundle.
    Author:
    OpenCollab
    • Constructor Detail

      • EpubWriter

        public EpubWriter()
    • Method Detail

      • writeEpubToFile

        public void writeEpubToFile​(EpubBook book,
                                    String fileName)
                             throws IOException
        Writes the EPUB book zip container and contents to a file
        Parameters:
        book - the EpubBook
        fileName - name of the file to be written
        Throws:
        IOException - if file could not be written
      • writeEpubToStream

        public void writeEpubToStream​(EpubBook book,
                                      OutputStream out)
                               throws IOException
        Writes the EPUB book zip container and contents to an OutputStream
        Parameters:
        book - the EpubBook
        out - the OutputStream to write to
        Throws:
        IOException - if file could not be written
      • getContainerXML

        public String getContainerXML()
        Returns:
        the CONTAINER_XML
      • setContainerXML

        public void setContainerXML​(String containerXML)
        Parameters:
        containerXML - the CONTAINER_XML to set
      • getContentFolder

        public String getContentFolder()
        Returns:
        the CONTENT_FOLDER
      • setContentFolder

        public void setContentFolder​(String contentFolder)
        Parameters:
        contentFolder - the CONTENT_FOLDER to set
      • getOpfFileName

        public String getOpfFileName()
        Returns:
        the OPF_FILE_NAME
      • setOpfFileName

        public void setOpfFileName​(String opfFileName)
        Parameters:
        opfFileName - the OPF_FILE_NAME to set
      • getOpfCreator

        public OpfCreator getOpfCreator()
        Returns:
        the opfCreator
      • setOpfCreator

        public void setOpfCreator​(OpfCreator opfCreator)
        Parameters:
        opfCreator - the opfCreator to set
      • getTocCreator

        public TocCreator getTocCreator()
        Returns:
        the tocCreator
      • setTocCreator

        public void setTocCreator​(TocCreator tocCreator)
        Parameters:
        tocCreator - the tocCreator to set