Click to See Complete Forum and Search --> : File IO [resolved]
filburt1
Jan 28th, 2002, 07:20 PM
Using a BufferedReader and BufferedWriter, is there a way to append to a file rather an overwriting it? Right now I read in the entire file and rewrite it which seems pretty slow.
Dillinger4
Jan 28th, 2002, 07:34 PM
public FileOutputStream(String name, boolean apppend) throws FileNotFoundException
or
public FileWriter(String name, boolean append) throws IOException
Dillinger4
Jan 28th, 2002, 07:38 PM
What i don't understand is that Java stress writing "pure Java" which means hard coding of files names should not be done. So then why do they add an append parameter to only the constructors that take a hard coded string as an arguement?
filburt1
Jan 28th, 2002, 07:41 PM
Java is a funky beast. :)
Thanks, Dilenger.
Dillinger4
Jan 28th, 2002, 07:45 PM
:eek: Buy the way nice web site you have. Great layout, and the content is pretty good too. :p
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.