code: public void addSeenUrl(String url, int docId) throws UnsupportedEncodingException {
          String canonicalUrl = URLCanonicalizer.getCanonicalURL(url);
          if (canonicalUrl == null) {
              logger.error("Invalid Url: {} (can't cannonicalize it!)", url);
          } else {
              try {
                  docIdServer.addUrlAndDocId(canonicalUrl, docId);
              } catch (RuntimeException e) {
                  if (config.isHaltOnError()) {
                      throw e;
                  } else {
                      logger.error("Could not add seen url: {}", e.getMessage());
                  }
              }
          }
      }
docs: This function can called to assign a specific document id to a url. This
  feature is useful when you have had a previous crawl and have stored the
  Urls and their associated document ids and want to have a new crawl which
  is aware of the previously seen Urls and won't re-crawl them.
  
  Note that if you add three seen Urls with document ids 1,2, and 7. Then
  the next URL that is found during the crawl will get a doc id of 8. Also
  you need to ensure to add seen Urls in increasing order of document ids.
  
  @param url
  the URL of the page
  @param docId
  the document id that you want to be assigned to this URL.
  @throws UnsupportedEncodingException