On Thu, Nov 25, 2010 at 9:45 AM, Pid <p...@pidster.com> wrote: > On 24/11/2010 22:11, declan harrison wrote: >>> How are you writing to the output of the response? >>> > >> Im wrapping the response ServletOutputStream in a BufferedOutputStream; >> Something like this bufOutStream = new >> BufferedOutputStream(response.getOutputStream(),20480); > > ... and how are you writing to the BufferedOutputStream? >
So I end up calling this method for most of the writes that are performed for binary IO. @Override public synchronized void write(byte[] b, int off, int len) throws IOException { long bTime = System.currentTimeMillis(); super.write(b, off, len); long aTime = System.currentTimeMillis(); timeDelta += aTime-bTime; ++numWrites; updateSNMPValue(bWrote); } Im not clear when I call response.addHeader and response.sendError, what or if the BufferedOutput stream IO is called by Tomcat Coyote. When I debug the Web App I see that BufferedOutputStream underlying OutputStream (protected) is in fact a CoyoteOutputStream (I can access this object) and it contains a protected object called org.apache.catalina.connector.OutputBuffer. I would dearly like to get at this objects data but I cannot as its protected, this contains the headers and details about the stream and its state. Is there a way to dump out this object OutputBuffer details. Is there any debug logs I can enable here? Thanks --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org