I'd agree that flushing is a rather good practice, and while one's at it, the mrs' generally appreciate having the toilet seat lid down.
On Tue, May 26, 2009 at 12:12 AM, Christian Catchpole < [email protected]> wrote: > > My expectation would be to close() as it should be abstracted from any > real IO stream and closing should do no harm. In fact there can be > cases where harm is done if you don't close, or at least flush. I > wrote a method to wrap the OutputStream with a compressing stream if > the client would accept it. This would be the same for any buffered > stream that you wrap around the OutputStream. You will have to flush > it as the container closing the stream it handed you is not going to > flush your wrapper stream. And a close is as good as a flush. > > I do accept that I've often never closed on non-wrapped streams and > it's done no harm. > > As for Brian's case, I would expect that closing the stream has "gone > too far" closing some underlying stream prematurely. > > > > > -- Viktor Klang Rockstar Developer --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---
