code: @Override
  	public URI toUri() {
  		try {
  			if (this.encoded) {
  				return new URI(toString());
  			}
  			else {
  				String path = getPath();
  				if (StringUtils.hasLength(path) && path.charAt(0) != PATH_DELIMITER) {
  					// Only prefix the path delimiter if something exists before it
  					if (getScheme() != null || getUserInfo() != null || getHost() != null || getPort() != -1) {
  						path = PATH_DELIMITER + path;
  					}
  				}
  				return new URI(getScheme(), getUserInfo(), getHost(), getPort(), path, getQuery(),
  						getFragment());
  			}
  		}
  		catch (URISyntaxException ex) {
  			throw new IllegalStateException("Could not create URI object: " + ex.getMessage(), ex);
  		}
  	}
docs: Returns a {@code URI} from this {@code UriComponents} instance.