code: private void writeBinaryFile(String path, InputStream is) throws IOException {
      zip.putNextEntry(new ZipEntry(path));
      try {
        IOUtils.copy(is, zip);
      }
      finally {
        zip.closeEntry();
      }
    }
docs: Writes an binary file entry to the ZIP output stream.
  @param path Content path
  @param is Input stream with binary data
  @throws IOException I/O exception