Class ZipUtil

java.lang.Object
org.rapidcontext.util.ZipUtil

public final class ZipUtil extends Object
A set of utility methods for handling ZIP files.
Version:
1.0
  • Method Details

    • unpackZip

      public static void unpackZip(File zipFile, File dir) throws IOException
      Unpacks a ZIP file into a specified directory.
      Parameters:
      zipFile - the ZIP file to unpack
      dir - the destination directory
      Throws:
      IOException - if the ZIP file couldn't be read or the destination files couldn't be written
    • unpackZip

      public static void unpackZip(ZipFile zip, File dir) throws IOException
      Unpacks a ZIP file into a specified directory. This function will not close the ZIP file specified.
      Parameters:
      zip - the ZIP file to unpack
      dir - the destination directory
      Throws:
      IOException - if the ZIP file couldn't be read or the destination files couldn't be written