code: public boolean contains(String id) {
          assertNotEmpty(id, "id");
          InputStream response = null;
          try {
              response = couchDbClient.head(new DatabaseURIHelper(dbUri).documentUri(id));
          } catch (NoDocumentException e) {
              return false;
          } finally {
              close(response);
          }
          return true;
      }
docs: Checks if a document exist in the database.
  
  @param id The document _id field.
  @return true If the document is found, false otherwise.