public static String encode(final String value,final String encoding){
  try {
    return (value != null ? URLEncoder.encode(value,encoding) : value);
  }
 catch (  UnsupportedEncodingException ignore) {
    return value;
  }
}

public static String encode ( final String value , final String encoding ) { try { return ( value != null ? URLEncoder . encode ( value , encoding ) : value ) ; } catch ( UnsupportedEncodingException ignore ) { return value ; } }
encode the string value using the specified encoding . < p / >
