I want monitor the response size in a servlet, so I plan to add filter to implement this function.
But I don't know how to get the response size when I check HttpServletResponse
methods:
response.getWriter()
response.getOutputStream()
Is there any efficient way to calculate the total response size?