Better yet, if you are only writing character data, you should use Writers, specifically the BufferedWriter... String text = "This is text to write to file."; File = new File("yourfile.whatever"); FileWriter fw = new FileWriter(file); BufferedWriter writer = new BufferedWriter(fw); writer.write(text); writer.close(); FileWriter will do this by itself, but the BufferedWriter povides some buffering for more efficiency. Hope this helps.
- Chris Stehno, SCPJ
Whoever got anywhere by being normal? Just ask this exceptional tiny ad:
a bit of art, as a gift, that will fit in a stocking