docs: @Deprecated
  	public static String encodeUri(String uri, String encoding) throws UnsupportedEncodingException {
  		Assert.notNull(uri, "URI must not be null");
  		Assert.hasLength(encoding, "Encoding must not be empty");
  		Matcher matcher = URI_PATTERN.matcher(uri);
  		if (matcher.matches()) {
  			String scheme = matcher.group(2);
  			String authority = matcher.group(3);
  			String userinfo = matcher.group(5);
  			String host = matcher.group(6);
  			String port = matcher.group(8);
  			String path = matcher.group(9);
  			String query = matcher.group(11);
  			String fragment = matcher.group(13);
  			return encodeUriComponents(scheme, authority, userinfo, host, port, path, query, fragment, encoding);
  		}
  		else {
  			throw new IllegalArgumentException("[" + uri + "] is not a valid URI");
  		}
  	}