Package jmri.util

Class UnzipFileClass

java.lang.Object
jmri.util.UnzipFileClass

public class UnzipFileClass extends Object
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 Details

  • 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

      public static void unzipFunction(File directory, InputStream input)
      Unzip contents into a directory.
      Parameters:
      directory - Destination for contents, created if need be
      input - in .zip format