I am interested in writing some data that I get in two different files (same data).
In my code, I use BufferedWriterit FileWriterto write data to files, and I want to write the same data as a backup in local storage and on an SD card.
My question is: if I need to implement this with 2 FileWritersand 2 BufferedWriters, or is there a way to use the same BufferedWriterfor both files?
Is there a more efficient way to accomplish this?
source
share