code: static void addEntry(ZipEntry zipEntry, InputStream in, ZipOutputStream out) throws IOException {
      out.putNextEntry(zipEntry);
      if (in != null) {
        IOUtils.copy(in, out);
      }
      out.closeEntry();
    }
docs: Adds a given ZIP entry to a ZIP file.
  
  @param zipEntry
  new ZIP entry.
  @param in
  contents of the ZIP entry.
  @param out
  target ZIP stream.