Class UnzipUtility
java.lang.Object
net.agilhard.maven.plugins.jpacktool.handler.UnzipUtility
public class UnzipUtility
extends java.lang.Object
This utility extracts files and directories of a standard zip file to
a destination directory.
-
Method Summary
Modifier and Type Method Description static java.util.List<java.io.File>
collect(java.io.File zipFile, java.io.File destDir)
Collect a list of files in a destination Directory from entries in the zip file specified by the zipFilePath but do not actually create the files.static void
unzip(java.io.File zipFile, java.io.File destDir)
Extracts a zip file specified by the zipFilePath to a directory specified by destDirectory (will be created if does not exists)
-
Method Details
-
unzip
public static void unzip(java.io.File zipFile, java.io.File destDir) throws java.io.IOExceptionExtracts a zip file specified by the zipFilePath to a directory specified by destDirectory (will be created if does not exists)- Parameters:
zipFile
- the zip filedestDir
- the destination Directory- Throws:
java.io.IOException
- on I/O Errror
-
collect
public static java.util.List<java.io.File> collect(java.io.File zipFile, java.io.File destDir) throws java.io.IOExceptionCollect a list of files in a destination Directory from entries in the zip file specified by the zipFilePath but do not actually create the files.- Parameters:
zipFile
- the zip filedestDir
- the destination Directory- Returns:
- the list of files generated
- Throws:
java.io.IOException
- on I/O Errror
-