code: public UriComponentsBuilder uri(URI uri) {
  		Assert.notNull(uri, "'uri' must not be null");
  		this.scheme = uri.getScheme();
  		if (uri.isOpaque()) {
  			this.ssp = uri.getRawSchemeSpecificPart();
  			resetHierarchicalComponents();
  		}
  		else {
  			if (uri.getRawUserInfo() != null) {
  				this.userInfo = uri.getRawUserInfo();
  			}
  			if (uri.getHost() != null) {
  				this.host = uri.getHost();
  			}
  			if (uri.getPort() != -1) {
  				this.port = String.valueOf(uri.getPort());
  			}
  			if (StringUtils.hasLength(uri.getRawPath())) {
  				this.pathBuilder = new CompositePathComponentBuilder(uri.getRawPath());
  			}
  			if (StringUtils.hasLength(uri.getRawQuery())) {
  				this.queryParams.clear();
  				query(uri.getRawQuery());
  			}
  			resetSchemeSpecificPart();
  		}
  		if (uri.getRawFragment() != null) {
  			this.fragment = uri.getRawFragment();
  		}
  		return this;
  	}
docs: Initialize all components of this URI builder with the components of the given URI.
  @param uri the URI
  @return this UriComponentsBuilder