How to append something on a file?# Java - 爪哇娇娃
w*l
1 楼
Hi,
I am using the following codes to create a file and put some strings (or some
other format data) into this file. I hope to save some extra strings into this
file when I run this program again. Of course, I don't want to delete the
original strings (or data). How can I finish this function?
File data_File = new File("image_data.txt");
FileOutputStream data_Stream = new FileOutputStream(data_File);
PrintWriter data_write_Stream = new PrintWriter(data_Stream);
data_write_Stream.print("abc");
Th
I am using the following codes to create a file and put some strings (or some
other format data) into this file. I hope to save some extra strings into this
file when I run this program again. Of course, I don't want to delete the
original strings (or data). How can I finish this function?
File data_File = new File("image_data.txt");
FileOutputStream data_Stream = new FileOutputStream(data_File);
PrintWriter data_write_Stream = new PrintWriter(data_Stream);
data_write_Stream.print("abc");
Th