Hi All,

I have a servlet class that downloads a file to a user. It looks
something like this.

                int size=0;
                File target=new File(f_Path+"/"+os_filename);

                int fileSize=new Long(target.length()).intValue();

                res.setContentLength(fileSize);

                byte[] buffer = new byte[4*1024];
                FileInputStream in = new FileInputStream(target);

                while ((size= in.read(buffer,0,4*1024)) != -1) {
                        obf.write(buffer,0,size);
                }
                obf.flush();
                in.close();
                obf.close();

The issue I have is that certain users on low bandwodth links are
getting timeouts even though they obviously still have connectivity.

Does anyone have any hints as to why this might happen -- platform is
Apache + Jrun on Linux -- kind of old versions of the software.

Clayton Nash

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to