code: public void addFile(String path, InputStream inputStream, String contentType) throws IOException {
      String fullPath = buildJcrPathForZip(path);
      writeBinaryFile(fullPath, inputStream);
  
      if (StringUtils.isNotEmpty(contentType)) {
        String mimeType = StringUtils.substringBefore(contentType, CONTENT_TYPE_CHARSET_EXTENSION);
        String encoding = StringUtils.substringAfter(contentType, CONTENT_TYPE_CHARSET_EXTENSION);
  
        String fullPathMetadata = fullPath + DOT_DIR_FOLDER + "/" + DOT_CONTENT_XML;
        Document doc = xmlContentBuilder.buildNtFile(mimeType, encoding);
        writeXmlDocument(fullPathMetadata, doc);
      }
    }
docs: Adds a binary file with explicit mime type.
  @param path Full content path and file name of file
  @param inputStream Input stream with binary data
  @param contentType Mime type, optionally with ";charset=XYZ" extension
  @throws IOException I/O exception