private String encode(String s){
  try {
    return URLEncoder.encode(s,"UTF-8");
  }
 catch (  UnsupportedEncodingException e) {
    throw new RuntimeException("UTF-8 is not supported by the JVM",e);
  }
}

private String encode ( String s ) { try { return URLEncoder . encode ( s , "UTF-8" ) ; } catch ( UnsupportedEncodingException e ) { throw new RuntimeException ( "UTF-8 is not supported by the JVM" , e ) ; } }
encodes a string using utf - 8 .
