This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Servlets and the fly likes Buffer Size of File Downloading Servlet ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Buffer Size of File Downloading Servlet ?" Watch "Buffer Size of File Downloading Servlet ?" New topic

Buffer Size of File Downloading Servlet ?

Neeraj Dhiman
Ranch Hand

Joined: Dec 19, 2011
Posts: 67

How much buffer size should i set? i have various file(images,zip,excel,txt etc) 25kb to 25Mb to download.

I've set the buffer to 8192 (8k), it seems to work fine although I don't really know if there's an advantage or disadvantage to changing this value. 8k just seemed like a reasonable size. Any suggestions?

Correct Me if i am wrong
Paul Clapham

Joined: Oct 14, 2005
Posts: 19693

That's probably good enough. You could experiment with other buffer sizes and see if it made any significant difference, if you liked, but I don't think it's going to.
I agree. Here's the link:
subject: Buffer Size of File Downloading Servlet ?
It's not a secret anymore!