RE: Tomcat download stream gets broken

2011-05-19 Thread Rob GB
Thanks everybody. Someone suggested commons IO could provide some cool stream APIs, I'll try all recommendations, including asynchronous writes. Cheers! > Date: Thu, 19 May 2011 18:25:45 +0200 > From: a...@ice-sa.com > To: users@tomcat.apache.org > Subje

RE: Tomcat download stream gets broken

2011-05-19 Thread Rob GB
.java:560)        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:361)        ... 23 more > Date: Thu, 19 May 2011 18:03:39 +0200 > From: a...@ice-sa.com > To: users@tomcat.apache.org > Subject: Re: Tomcat download stream gets broken > > Rob GB wrote: > >> No-one is goi

RE: Tomcat download stream gets broken

2011-05-19 Thread Rob GB
> No-one is going to read all that unformatted code. Try again.> > p> ok, trying again, it looks formatted in hotmail editor: I have a file download servlet running on Tomcat, the code is public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {

Tomcat download stream gets broken

2011-05-19 Thread Rob GB
Hi all, I have a file download servlet running on Tomcat, the code is public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {byte buf[] = new byte[1024 * 4]; try {File file = new File(realFilename);int size =