code: static String encodeUriComponent(String source, String encoding, Type type) throws UnsupportedEncodingException {
  		if (source == null) {
  			return null;
  		}
  		Assert.hasLength(encoding, "Encoding must not be empty");
  		byte[] bytes = encodeBytes(source.getBytes(encoding), type);
  		return new String(bytes, "US-ASCII");
  	}
docs: Encodes the given source into an encoded String using the rules specified
  by the given component and with the given options.
  @param source the source string
  @param encoding the encoding of the source string
  @param type the URI component for the source
  @return the encoded URI
  @throws IllegalArgumentException when the given uri parameter is not a valid URI