code: private static void addFileToZip(String path, File file, ZipOutputStream zos) throws IOException {
          String currentPath = StringUtils.isNotEmpty(path)? path + "/" + file.getName(): file.getName();
  
          zos.putNextEntry(new ZipEntry(currentPath));
  
          InputStream is = new BufferedInputStream(new FileInputStream(file));
          try {
              IOUtils.copy(is, zos);
          } finally {
              IOUtils.closeQuietly(is);
          }
  
          zos.closeEntry();
      }
docs: Adds a file to the current zip output stream
  
  @param path the path of the parent folder in the zip
  @param file the file to be added
  @param zos  the current zip output stream
  @throws FileNotFoundException
  @throws IOException