public static String encode ( final String str ) { try { return URLEncoder . encode ( str , "UTF-8" ) ; } catch ( final Exception e ) { LOGGER . log ( Level . WARN , "Encodes str [" + str + "] failed" , e ) ; return str ; } }
Encodes the specified string .