code: private static void zipDir(final File srcDir, final FileFilter filter, final String destPath, final ZipOutputStream out)
              throws IOException {
  
          final File[] files = listFiles(srcDir, filter);
          for (int i = 0; i < files.length; i++) {
              if (files[i].isDirectory()) {
                  zipDir(files[i], filter, concatPathAndFilename(destPath, files[i].getName(), File.separator), out);
              } else {
                  zipFile(files[i], destPath, out);
              }
          }
  
      }
docs: Add a directory to a ZIP output stream.
  
  @param srcDir
  Directory to add - Cannot be <code>null</code> and must be a valid directory.
  @param filter
  Filter or <code>null</code> for all files.
  @param destPath
  Path to use for the ZIP archive - May be <code>null</code> or an empyt string.
  @param out
  Destination stream - Cannot be <code>null</code>.
  
  @throws IOException
  Error writing to the output stream.