wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 63

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: 18541

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: http://aspose.com/file-tools
subject: Buffer Size of File Downloading Servlet ?
Similar Threads
End Of File Marker
How do you link 8k with 12264 ?
Copying a file over the network
Cannot download the whole text file