public String encode ( BitSet safe , String pString , String cs ) throws UnsupportedEncodingException { if ( pString == null ) { return null ; } return new String ( encodeUrl ( safe , pString . getBytes ( cs ) ) , Charsets . US_ASCII ) ; }
Encodes a string into its URL safe form using the specified string charset . Unsafe characters are escaped .