But when you call WebResponse.getOutputStream() you aren't creating it directly and the javadoc doesn't specify who's responsibility it is to close it.
The only problem I've ever run into on this was that I had an image output stream that wrapped the stream returned by getOutputStream(). I neglected to close the wrapping outputstream so when it garbage collected later it would close itself and the underlying stream which was bad because the underlying outputstream was a shared instance provided by tomcat. Caused some very weird behavior. On Fri, 2007-05-11 at 19:04 -0400, Jesse Kuhnert wrote: > It should. Anything that opens an IO stream in any java application should > always try to close it as soon as possible unless you are using it as some > kind of continuous stream of communication. (on unix based systems it will > steal file handles ) > > On 5/10/07, Dan Adams <[EMAIL PROTECTED]> wrote: > > > > When you have an engine service that serves up binary files, for > > instance, and calls WebResponse.getOutputStream() should it or should it > > not close the output stream when it's done with it? > > > > -- > > Dan Adams > > Senior Software Engineer > > Interactive Factory > > 617.235.5857 > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- Dan Adams Senior Software Engineer Interactive Factory 617.235.5857 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]