code: private static void zipFile(final File srcFile, final String destPath, final ZipOutputStream out) throws IOException {
  
          final byte[] buf = new byte[1024];
          try (final InputStream in = new BufferedInputStream(new FileInputStream(srcFile))) {
              final ZipEntry zipEntry = new ZipEntry(concatPathAndFilename(destPath, srcFile.getName(), File.separator));
              zipEntry.setTime(srcFile.lastModified());
              out.putNextEntry(zipEntry);
              int len;
              while ((len = in.read(buf)) > 0) {
                  out.write(buf, 0, len);
              }
              out.closeEntry();
          }
      }
docs: Adds a file to a ZIP output stream.
  
  @param srcFile
  File to add - Cannot be <code>null</code>.
  @param destPath
  Path to use for the file - May be <code>null</code> or empty.
  @param out
  Destination stream - Cannot be <code>null</code>.
  
  @throws IOException
  Error writing to the output stream.