code: public void unzipArchive(String file, File outputDir)
        throws IOException {
  
      try (ZipFile zipFile = new ZipFile(file)) {
  
        final Enumeration<? extends ZipEntry> entries = zipFile.entries();
        while (entries.hasMoreElements()) {
          final ZipEntry entry = entries.nextElement();
          final File entryDestination = new File(outputDir, entry.getName());
          if (!org.apache.gobblin.util.FileUtils.isSubPath(outputDir, entryDestination)) {
            throw new IOException(String.format("Extracted file: %s is trying to write outside of output directory: %s",
                entryDestination, outputDir));
          }
  
          if (entry.isDirectory()) {
            // If entry is directory, create directory
            if (!entryDestination.mkdirs() && !entryDestination.exists()) {
              throw new IOException("Could not create directory: " + entryDestination
                  + " while un-archiving zip: " + file);
            }
          } else {
            // Create parent dirs if required
            if (!entryDestination.getParentFile().mkdirs() && !entryDestination.getParentFile().exists()) {
              throw new IOException("Could not create parent directory for: " + entryDestination
                  + " while un-archiving zip: " + file);
            }
  
            // Extract and save the conf file
            InputStream in = null;
            OutputStream out = null;
            try {
              in = zipFile.getInputStream(entry);
              out = new FileOutputStream(entryDestination);
              IOUtils.copy(in, out);
            } finally {
              if (null != in)
                IOUtils.closeQuietly(in);
              if (null != out)
                IOUtils.closeQuietly(out);
            }
          }
        }
      }
    }
docs: *
  Unzip a zip archive
  @param file Zip file to unarchive
  @param outputDir Output directory for the unarchived file
  @throws IOException If any issue occurs in unzipping the file