Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Servlet Interest »

Re: Close the Stream

Chris Pratt

2005-10-04

Replies:

Nope.  I always do out of habit and because I consider it cleaner code, but it is the Servlet Engine's responsibility to close the stream if you don't.
  (*Chris*)

On 10/4/05, SUBSCRIBE EJB-INTEREST anonymous <ahtwog@yahoo.com> wrote:
Hi,
I use HttpServletResponse's getOutputStream().println(String) to print a
message in servlet.
My question is do I have to close the stream before leaving the method.
If not,will it impact the performance.

Thanks in advance,

___________________________________________________________________________
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________ To unsubscribe, send email to listserv@java.sun.com and include in the body of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

©2008 junlu.com - Jax Systems, LLC, U.S.A.