public String encode(String pString) throws EncoderException {
  if (pString == null) {
    return null;
  }
  try {
    return encode(pString,getDefaultCharset());
  }
 catch (  UnsupportedEncodingException e) {
    throw new EncoderException(e.getMessage());
  }
}

public String encode ( String pString ) throws EncoderException { if ( pString == null ) { return null ; } try { return encode ( pString , getDefaultCharset ( ) ) ; } catch ( UnsupportedEncodingException e ) { throw new EncoderException ( e . getMessage ( ) ) ; } }
encodes a string into its url safe form using the default string charset . unsafe characters are escaped .
