public static String encode ( String str ) { try { return java . net . URLEncoder . encode ( str , "UTF-8" ) ; } catch ( java . io . UnsupportedEncodingException ue ) { return str ; } }
encodes the given string using URLEncoder .