My Java standalone application gets a URL (which points to a file) from the user and I need to hit it and download it. The problem I am facing is that I am not able to encod
How about:
public String UrlEncode(String in_) {
String retVal = ""; try { retVal = URLEncoder.encode(in_, "UTF8"); } catch (UnsupportedEncodingException ex) { Log.get().exception(Log.Level.Error, "urlEncode ", ex); } return retVal;
}