In android, I am writing a file on clicking a button and on clicking next time, it saves the file and closes the buffered writer. But, I also want to implement functionality to close the buffered writer in onDestroy function. Before that I need to know if Bufferedwriter
is already closed. How will I check if Buffered Writer is already closed?
In addition to that, does bufferedWriter.close()
function set bufferedWriter
to null
?