clearing cache
843807Dec 14 2008 — edited Dec 17 2008Hi,
I have an applet in which i need to download a text file multiple times (the same file). The problem is that the file gets stored in the cache after the first load and therefore each time I try to download it I get the original file.
The only way that I know of to avoid this is to clear the classloader cache through the console (or to restart java).
Is there any way to either clear the cache programmatically (from what I've read you can't) or to force a load? The code is simply:
new BufferedReader( new InputStreamReader( new URL("http://www.URL.txt").openStream()));
thanks