code: public InputStream getAttachment(String docId, String attachmentName) {
          return getAttachment(docId, attachmentName, null);
      }
docs: Reads an attachment from the database.
  
  The stream must be closed after usage, otherwise http connection leaks will occur.
  
  @param docId the document id
  @param attachmentName the attachment name
  @return the attachment in the form of an {@code InputStream}.