Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Buffer Size of File Downloading Servlet ?

 
Neeraj Dhiman
Ranch Hand
Posts: 68
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
Thanks
 
Paul Clapham
Sheriff
Posts: 21298
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic