Package jmri.util
Class UnzipFileClass
java.lang.Object
jmri.util.UnzipFileClass
Unzip a local file or URL to into a specified directory
Largely from https://examples.javacodegeeks.com/core-java/util/zip/zipinputstream/java-unzip-file-example/
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidunzipFunction(File directory, InputStream input) Unzip contents into a directory.static voidunzipFunction(String destinationFolder, String zipFile) Unzip contents into a directory.
-
Constructor Details
-
UnzipFileClass
public UnzipFileClass()
-
-
Method Details
-
unzipFunction
public static void unzipFunction(String destinationFolder, String zipFile) throws 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:
FileNotFoundException- if File Not Found.
-
unzipFunction
Unzip contents into a directory.- Parameters:
directory- Destination for contents, created if need beinput- in .zip format
-