I'm interested in writing some data I'm receiving into two different files (same data).
In my code, I'm using BufferedWriter
and FileWriter
to write the data to files, and I want, as a backup, to write the same data on the local storage and on the SD card.
My question is if I need to implement this with 2 FileWriters
and 2 BufferedWriters
, or is there a way to use the same BufferedWriter
for both files?
Is there a more efficient way to implement this task?