Daisy Open Source CMS

org.outerj.daisy.tools.importexport.export.fs
Class ZipExportFile

java.lang.Object
  extended by org.outerj.daisy.tools.importexport.export.fs.LocalExportFile
      extended by org.outerj.daisy.tools.importexport.export.fs.ZipExportFile
All Implemented Interfaces:
ExportFile

public class ZipExportFile
extends LocalExportFile

An ExportFile implementation that writes the export data to a zip file. Internally, data is first written to a temporary directory which is than zipped.


Constructor Summary
ZipExportFile(File zipFile, ExportListener listener)
           
 
Method Summary
 void fileToZip(File file, File zipFile, int compressionLevel)
           
 void finish()
          Called when everything is written to the export file.
 
Methods inherited from class org.outerj.daisy.tools.importexport.export.fs.LocalExportFile
getOutputStream, isWithin, store
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZipExportFile

public ZipExportFile(File zipFile,
                     ExportListener listener)
              throws IOException
Throws:
IOException
Method Detail

finish

public void finish()
            throws ImportExportException
Description copied from interface: ExportFile
Called when everything is written to the export file. After this method is called, ExportFile.getOutputStream(java.lang.String) should not be called anymore.

Specified by:
finish in interface ExportFile
Overrides:
finish in class LocalExportFile
Throws:
ImportExportException

fileToZip

public void fileToZip(File file,
                      File zipFile,
                      int compressionLevel)
               throws Exception
Throws:
Exception

Daisy Open Source CMS