public static String encode(String content){
  try {
    return URLEncoder.encode(content,"UTF-8");
  }
 catch (  final UnsupportedEncodingException e) {
    throw new AssertionError(e);
  }
}

public static String encode ( String content ) { try { return URLEncoder . encode ( content , "UTF-8" ) ; } catch ( final UnsupportedEncodingException e ) { throw new AssertionError ( e ) ; } }
encode a string into a valid url string .
