public static String encodeAuthority ( String authority , String encoding ) throws UnsupportedEncodingException { return HierarchicalUriComponents . encodeUriComponent ( authority , encoding , HierarchicalUriComponents . Type . AUTHORITY ) ; }
Encodes the given URI authority with the given encoding .