# Java + FileReader and FileWriter using URL



## aussiemcgr (Jun 14, 2008)

I have an applet embedded on my website and I need a little help with working with FileReader and FileWriter. What I'm trying to do be able to read and write to a text file located on the same server (and folder) as my main. I only have about 2 weeks experience with FileReader and FileWriter and all of my experience has been with interacting with local files, however that will not work for what I'm trying to do. I have managed to connect to my text file and read from it using Scanner, however I will still need to write to the file so FileReader and FileWriter should be the better choices. I have searched for quite some time but I havent managed to find a way to connect to what is effectively a URL using FileReader or FileWriter. 

If anyone can tell me how to connect to it, I would be very grateful.

Cheers


----------



## systemErr (Apr 18, 2008)

Hi, couldn't you wrap your readers/writers around this: new File(new URL("blah.html").toURI())


----------

