public static String encodeUserInfo ( String userInfo , String encoding ) throws UnsupportedEncodingException { return HierarchicalUriComponents . encodeUriComponent ( userInfo , encoding , HierarchicalUriComponents . Type . USER_INFO ) ; }
Encodes the given URI user info with the given encoding .