Writing data to file

In what way should you write data to a file to get the Best performance.

Lets say I have a method called

void writeData(String line){

}

If I feed the writeData method with lines, should I use a BufferedWriter wrapped around a FileWriter.

Should I use Streams instead?

PrintWriter seems to be working quite bad.

After accessing 61 files(no matter size) my BufferedWriter takes a large pause.

[461 byte] By [MagDy] at [2007-9-26 3:13:58]
# 1
In general, buffers are a good idea. However I suggest you simply write a small test program that mimics your output process, and test the combinations.
bschauwe at 2007-6-29 11:23:49 > top of Java-index,Archived Forums,Java Programming...