code: public HttpPut createContentPutMethod(final String path, final Map<String, List<String>> params,
                                            final FedoraContent content ) {
          String contentPath = path;
          if ( content != null && content.getChecksum() != null ) {
              contentPath += "?checksum=" + content.getChecksum();
          }
  
          final HttpPut put = createPutMethod( contentPath, params );
  
          // content stream
          if ( content != null ) {
              put.setEntity( new InputStreamEntity(content.getContent()) );
          }
  
          // filename
          if ( content != null && content.getFilename() != null ) {
              put.setHeader("Content-Disposition", "attachment; filename=\"" + content.getFilename() + "\"" );
          }
  
          // content type
          if ( content != null && content.getContentType() != null ) {
              put.setHeader("Content-Type", content.getContentType() );
          }
  
          return put;
      }
docs: Create a request to create/update content.
  @param path The datastream path.
  @param params Mapping of parameters for the PUT request
  @param content Content parameters.
  @return PUT method