In the following example, which of the streams needs to be closed?
OutputStream os = new BufferedOutputStream(new FileOutputStream(f));
OutputStreamWriter osw = new OutputStreamWriter(os, "UTF-8");
...
osw.close();
Closing the OutputStreamWriter causes the data to be flushed, but do you have to close the other 2 streams? Are they still open? What about the FileOutputStream, there's not variable assigned to that, does it have to be closed as well as the BOS?
Thanks
Antony