protected String encode(final String value){
  try {
    return URLEncoder.encode(value,"UTF-8");
  }
 catch (  Exception exp) {
    return value;
  }
}

protected String encode ( final String value ) { try { return URLEncoder . encode ( value , "UTF-8" ) ; } catch ( Exception exp ) { return value ; } }
encode value as url compatible utf - 8 .
