我最终找到了一种获得想要的方法:
URLConnection con = servletURL.openConnection();BufferedInputStream bif = new BufferedInputStream(con.getInputStream());ObjectInputStream input = new ObjectInputStream(bif);int avail = bif.available();System.out.println("Response content size = " + avail);这使我可以看到客户端的响应大小。我仍然想知道它在发送之前在服务器端是什么,但这是次要的事情。



