code: public static String encodePath(String path, String encoding) throws UnsupportedEncodingException {
  		return HierarchicalUriComponents.encodeUriComponent(path, encoding, HierarchicalUriComponents.Type.PATH);
  	}
docs: Encodes the given URI path with the given encoding.
  @param path the path to be encoded
  @param encoding the character encoding to encode to
  @return the encoded path
  @throws UnsupportedEncodingException when the given encoding parameter is not supported