code: private InputStream getAttachment(URI uri) {
          HttpConnection connection = Http.GET(uri);
          couchDbClient.execute(connection);
          try {
              return connection.responseAsInputStream();
          } catch (IOException e) {
              throw new CouchDbException("Error retrieving response input stream.", e);
          }
      }
docs: Reads an attachment from the database.
  
  The stream must be closed after usage, otherwise http connection leaks will occur.
  
  @param uri the attachment URI
  @return the attachment in the form of an {@code InputStream}.