code: @InterfaceAudience.Public
      public void setAttachment(String name, String contentType, InputStream contentStream) {
          Attachment attachment = new Attachment(contentStream, contentType);
          addAttachment(attachment, name);
      }
docs: Sets the attachment with the given name. The Attachment data will be written
  to the Database when the Revision is saved.
  
  @param name          The name of the Attachment to set.
  @param contentType   The content-type of the Attachment.
  @param contentStream The Attachment content.  The InputStream will be closed
  after it is no longer needed.