Package jmri.util

Class UnzipFileClass


  • public class UnzipFileClass
    extends java.lang.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 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 be
        input - in .zip format