code: public static void pack(ZipEntrySource[] entries, File zip) {
      if (log.isDebugEnabled()) {
        log.debug("Creating '{}' from {}.", zip, Arrays.asList(entries));
      }
  
      OutputStream out = null;
      try {
        out = new BufferedOutputStream(new FileOutputStream(zip));
        pack(entries, out, true);
      }
      catch (IOException e) {
        throw ZipExceptionUtil.rethrow(e);
      }
      finally {
        IOUtils.closeQuietly(out);
      }
    }
docs: Compresses the given entries into a new ZIP file.
  
  @param entries
  ZIP entries added.
  @param zip
  new ZIP file created.