On 02/10/2012 02:52 PM, Alex Lam S.L. wrote:
Hi there,
Thanks for the pointer - I wasn't able to trace back to that email for
some reasons.
The problem is that:
- flush() is reporting IOException because underlying stream is closed
- close() is then forwarding that IOException now in JavaSE 8
I guess my question is: what is the best way to check and avoid the
case where OutputStream is already closed?
Regards,
Alex.
In my opinion, flush() should not throw an exception when the stream is
closed.
close() doesn't throw an exception in that case and close() should be
able to call flush().
Rémi