@Internal public final class ZipFiles extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
zipDirectory(java.io.File sourceDirectory,
java.io.File zipFile)
Zips an entire directory specified by the path.
|
static void |
zipDirectory(java.io.File sourceDirectory,
java.io.OutputStream outputStream)
Zips an entire directory specified by the path.
|
public static void zipDirectory(java.io.File sourceDirectory,
java.io.File zipFile)
throws java.io.IOException
sourceDirectory - the directory to read from. This directory and all subdirectories will
be added to the zip-file. The path within the zip file is relative to the directory given
as parameter, not absolute.zipFile - the zip-file to write to.java.io.IOException - the zipping failed, e.g. because the input was not readable.public static void zipDirectory(java.io.File sourceDirectory,
java.io.OutputStream outputStream)
throws java.io.IOException
sourceDirectory - the directory to read from. This directory and all subdirectories will
be added to the zip-file. The path within the zip file is relative to the directory given
as parameter, not absolute.outputStream - the stream to write the zip-file to. This method does not close
outputStream.java.io.IOException - the zipping failed, e.g. because the input was not readable.