org.sonar.api.utils
Class ZipUtils
java.lang.Object
org.sonar.api.utils.ZipUtils
public final class ZipUtils
- extends java.lang.Object
- Since:
- 1.10
Method Summary |
static java.io.File |
unzip(java.io.File zip,
java.io.File toDir)
Unzip a file into a directory. |
static void |
unzip(java.io.File zip,
java.io.File toDir,
ZipUtils.ZipEntryFilter filter)
|
static java.io.File |
unzipToTempDir(java.io.File zip)
Unzip a file into a new temporary directory. |
static void |
zipDir(java.io.File dir,
java.io.File zip)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
unzipToTempDir
public static java.io.File unzipToTempDir(java.io.File zip)
throws java.io.IOException
- Unzip a file into a new temporary directory. The directory is not deleted on JVM exit, so it
must be explicitely deleted.
- Returns:
- the temporary directory
- Throws:
java.io.IOException
- Since:
- 2.2
unzip
public static java.io.File unzip(java.io.File zip,
java.io.File toDir)
throws java.io.IOException
- Unzip a file into a directory. The directory is created if it does not exist.
- Returns:
- the target directory
- Throws:
java.io.IOException
unzip
public static void unzip(java.io.File zip,
java.io.File toDir,
ZipUtils.ZipEntryFilter filter)
throws java.io.IOException
- Throws:
java.io.IOException
zipDir
public static void zipDir(java.io.File dir,
java.io.File zip)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2009-2010 SonarSource. All Rights Reserved.