public static String encodePath ( String path , String encoding ) throws UnsupportedEncodingException { return HierarchicalUriComponents . encodeUriComponent ( path , encoding , HierarchicalUriComponents . Type . PATH ) ; }
Encodes the given URI path with the given encoding .