This is pretty simple, but I always forget and have to look it up.
To append to a file from a java program:
try {
BufferedWriter out = new BufferedWriter(new FileWriter("filename", true));
out.write("aString");
out.close();
} catch (IOException e) {
}
Found this on: http://www.exampledepot.com/egs/java.io/AppendToFile.html

No comments:
Post a Comment