Opening File URL in a Browser
I am trying to a TIFF file from my applet using file URL. The TIFF is located in the local file directory and I create an URL and get the Applet Context and call showDocument.
URL fileURL = new URL("file:///"+ <file location>);
applet.getAppletContext().showDocument(fileURL, "_blank");
The problem with the above code is that if the file location contains spaces it is not opening the TIFF file.
I tried using URLEncoder to encode the url so that the space could be replaced
URL fileURL = new URL("file:///"+ URLEncoder.encode(<file location>,"UTF-8"));
But when i tried with the above code, the spaces are converted to +. Even this is not recognized by browser.
What should I do so that spaces are converted to "%20" which is recognized by the browser. I tried various encoding formats nothing helps.

