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
String url=""http://search.barnesandnoble.com/booksearch/;
This will be constant i guess and only filename changes dyamically so get filename
String filename; // get the file name
String urlEnc=url+fileName.replace(" ","%20");