File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to read the response content length in terms of charaters

 
Pnbbabu Naresh
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I need to find out a way to know the response content length in terms of characters.

I went through HttpServeletResponse API. There are headers methods - getHeader() and getHeaderNames() through which contentlength of the response is retrieved. However, these methods were included with servelt 3.0.
I need to find the response length in the terms of charaters or in size with servlet 2.5.

If there are no API defined methods, please suggest how to achieve this.

Possible inputs are helpful for me.

Thanks and Regards,
Naresh
 
Shailesh Narkhede
Ranch Hand
Posts: 368
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

try method getHeader("Content-length"); of HttpServletResponse class.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic