title: Determine size of HTTP Response?
body: <p>Is there a way to determine the size of the <code>HTTPServletResponse</code> content?  I read this <a href="https://stackoverflow.com/questions/1674129/get-size-of-http-response-in-java">get-size-of-http-response-in-java</a> question but sadly where I work I do not have access to CommonsIO :(</p>
  
  <p>The response content consists of a single complex object so I have considered writing it out to a temp file and then checking that file.  This is not something I want to be doing as a diagnostic while the application is running in production though so want to avoid it if at all possible.</p>
  
  <p>PS I read erickson's answer but it mentioned input streams I want to know the size of the object being written out...  Would be really nice if the <code>writeObject()</code> method returned a number representing bytes written instead of <code>void</code>...</p>