How do I get the size of a response from a Spring 2.5 HTTP remoting call?
Posted
by aarestad
on Stack Overflow
See other posts from Stack Overflow
or by aarestad
Published on 2010-03-22T20:21:03Z
Indexed on
2010/05/18
15:50 UTC
Read the original article
Hit count: 346
I've been poking around the org.springframework.remoting.httpinvoker
package in Spring 2.5 trying to find a way to get visibility into the size of the response, but I keep going around in circles.
Via another question I saw here, I think what I want to do is get a handle on the InputStream
that represents the response from the server, and then wrap it with an Apache commons-io CountingInputStream
. What's the best way to go about doing this?
For the moment, I'd be happy with just printing the size of the response to stdout, but eventually I want to store it in a well-known location in my app for optional display.
© Stack Overflow or respective owner