private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
stream = new FileOutputStream(fileName, true); <<<<<<<<<<<
}
hidden #10625598
Level 23
hey a question, since when do we have to add true to a FileOutputStream parameter? what is this for?
Under discussion
Comments (3)
- Popular
- New
- Old
You must be signed in to leave a comment
Nouser
17 July 2020, 13:11
https://docs.oracle.com/javase/7/docs/api/java/io/FileOutputStream.html
0
hidden #10625598
17 July 2020, 13:20
nice thanks, it simply writes at the end of the file instead the beginning
0
Nouser
17 July 2020, 13:23
Yes, it adds to the existing file and doesn't overwrite it.
0