public static void unzip(String zipFilePath, String outputDirectoryPath) throws IOException {
    ZipFile zipFile = new ZipFile(zipFilePath);
    @SuppressWarnings("unchecked")
    Enumeration<ZipEntry> zipEntries = (Enumeration<ZipEntry>) zipFile.entries();

    try {
      while (zipEntries.hasMoreElements()) {
        ZipEntry zipEntry = zipEntries.nextElement();
        File entryDestination = new File(outputDirectoryPath + File.separator + zipEntry.getName());

        if (!entryDestination.toPath().normalize().startsWith(Paths.get(outputDirectoryPath))) {
          throw new IOException("Zip entry contained path traversal");
        }

        if (zipEntry.isDirectory()) {
          FileUtils.forceMkdir(entryDestination);
          continue;
        }
        File parent = entryDestination.getParentFile();
        if (parent != null) {
          FileUtils.forceMkdir(parent);
        }
        if (entryDestination.createNewFile()) {

          InputStream in = zipFile.getInputStream(zipEntry);
          OutputStream out = new FileOutputStream(entryDestination);
          try {
            IOUtils.copy(in, out);
          } finally {
            IOUtils.closeQuietly(in);
            IOUtils.closeQuietly(out);
          }
        } else {
          throw new IOException("Cannot create file :" + entryDestination.getCanonicalPath());
        }
      }
    } finally {
      zipFile.close();
    }
  }
*
Utilities class to zip/unzip directory
geode-core/src/main/java/org/apache/geode/management/internal/configuration/utils/ZipUtils.java