Is is necessary to close the input stream returned from HttpServletRequest?

Viewed 14144

I've got some production code that does something like:

HttpServletRequest httpServletRequest
...
DataInputStream dis = new DataInputStream(httpServletRequest.getInputStream())

These streams are never closed explicitly. I'm assuming here that the servlet container manages this (JBOss Web). What is the correct way to handle this?

4 Answers
Related