code: public InputStream getAttachment(String docId, String attachmentName, String revId) {
          final URI uri = new DatabaseURIHelper(dbUri).attachmentUri(docId, revId, attachmentName);
          return getAttachment(uri);
      }
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
  @param revId the document revision id or {@code null}
  @return the attachment in the form of an {@code InputStream}.