Package jmri.util
Class UnzipFileClass
- java.lang.Object
-
- jmri.util.UnzipFileClass
-
public class UnzipFileClass extends java.lang.Object
Unzip a local file or URL to into a specified directoryLargely from https://examples.javacodegeeks.com/core-java/util/zip/zipinputstream/java-unzip-file-example/
-
-
Constructor Summary
Constructors Constructor Description UnzipFileClass()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
unzipFunction(java.io.File directory, java.io.InputStream input)
Unzip contents into a directory.static void
unzipFunction(java.lang.String destinationFolder, java.lang.String zipFile)
Unzip contents into a directory.
-
-
-
Constructor Detail
-
UnzipFileClass
public UnzipFileClass()
-
-
Method Detail
-
unzipFunction
public static void unzipFunction(java.lang.String destinationFolder, java.lang.String zipFile) throws java.io.FileNotFoundException
Unzip contents into a directory.- Parameters:
destinationFolder
- Destination for contents, created if need be; relative or absolute, but must be pre-expanded.zipFile
- .zip file name; relative or absolute, but must be pre-expanded.- Throws:
java.io.FileNotFoundException
- if File Not Found.
-
unzipFunction
public static void unzipFunction(java.io.File directory, java.io.InputStream input)
Unzip contents into a directory.- Parameters:
directory
- Destination for contents, created if need beinput
- in .zip format
-
-