code: public static File zip(List<String> fileNames, String zipPath, String encoding) {
      try {
        FileOutputStream f = new FileOutputStream(zipPath);
        ZipArchiveOutputStream zos = (ZipArchiveOutputStream) new ArchiveStreamFactory()
            .createArchiveOutputStream(ArchiveStreamFactory.ZIP, f);
        if (null != encoding) {
          zos.setEncoding(encoding);
        }
        for (int i = 0; i < fileNames.size(); i++) {
          String fileName = fileNames.get(i);
          String entryName = Strings.substringAfterLast(fileName, File.separator);
          ZipArchiveEntry entry = new ZipArchiveEntry(entryName);
          zos.putArchiveEntry(entry);
          FileInputStream fis = new FileInputStream(fileName);
          IOs.copy(fis, zos);
          fis.close();
          zos.closeArchiveEntry();
        }
        zos.close();
        return new File(zipPath);
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
docs: <p>
  zip.
  </p>
  
  @param fileNames a {@link java.util.List} object.
  @param zipPath a {@link java.lang.String} object.
  @param encoding a {@link java.lang.String} object.
  @return a {@link java.io.File} object.