code: public void setContentProperties(String spaceId,
                                       String contentId,
                                       Map<String, String> contentProperties) {
          log.debug("setContentProperties(" + spaceId + ", " + contentId + ")");
  
          // Will throw if bucket does not exist
          String bucketName = getBucketName(spaceId);
  
          String contentEncoding = removeContentEncoding(contentProperties);
  
          contentProperties = removeCalculatedProperties(contentProperties);
  
          // Determine mimetype, from properties list or existing value
          String mimeType = contentProperties.remove(PROPERTIES_CONTENT_MIMETYPE);
          if (mimeType == null || mimeType.equals("")) {
              Map<String, String> existingMeta =
                  getContentProperties(spaceId, contentId);
              String existingMime =
                  existingMeta.get(StorageProvider.PROPERTIES_CONTENT_MIMETYPE);
              if (existingMime != null) {
                  mimeType = existingMime;
              }
          }
  
          // Collect all object properties
          ObjectMetadata objMetadata = new ObjectMetadata();
          for (String key : contentProperties.keySet()) {
              if (log.isDebugEnabled()) {
                  log.debug("[" + key + "|" + contentProperties.get(key) + "]");
              }
              objMetadata.addUserMetadata(getSpaceFree(key), contentProperties.get(key));
          }
  
          // Set Content-Type
          if (mimeType != null && !mimeType.equals("")) {
              objMetadata.setContentType(mimeType);
          }
  
          // Set Content-Encoding
          if (contentEncoding != null && !contentEncoding.equals("")) {
              objMetadata.setContentEncoding(contentEncoding);
          }
  
          updateObjectProperties(bucketName, contentId, objMetadata);
      }
docs: {@inheritDoc}