Is it possible to open a file a in java append data and close numerous times. For example:
//---- psuedocode
//class variable declaration
FileWriter writer1 = new FileWriter(filename);
fn1:
writer.append(data - title);
fn2:
while(incomingdata == true){
writer.append(data)
writer.flush();
writer.close()
}
The problem lies in the while loop. The file is closed and cant be opened again. Any one can help me in this?
writer.flush()
will do. – Amersfoort