Package org.opencms.ui.apps.logfile
Class CmsLogDownloadDialog.ZipGenerator
- java.lang.Object
-
- org.opencms.ui.apps.logfile.CmsLogDownloadDialog.ZipGenerator
-
- Enclosing class:
- CmsLogDownloadDialog
public static class CmsLogDownloadDialog.ZipGenerator extends java.lang.Object
Helper class for generating the zip file for the log download.
-
-
Constructor Summary
Constructors Constructor Description ZipGenerator(java.io.OutputStream output)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToZip(java.io.File directory, java.io.File file)
Adds a file to a zip-stream.void
close()
Closes the zip stream.
-
-
-
Constructor Detail
-
ZipGenerator
public ZipGenerator(java.io.OutputStream output)
Creates a new instance.- Parameters:
output
- the output stream to write to
-
-
Method Detail
-
addToZip
public void addToZip(java.io.File directory, java.io.File file) throws java.io.IOException
Adds a file to a zip-stream.- Parameters:
directory
- to be zippedfile
- to be added zo zip- Throws:
java.io.IOException
- exception
-
close
public void close() throws java.io.IOException
Closes the zip stream.- Throws:
java.io.IOException
- if something goes wrong
-
-