This discussion is archived
4 Replies Latest reply: Jul 25, 2012 12:01 PM by 910943 RSS

How do I determine the optimum buffer size when reading from input streams?

910943 Newbie
Currently Being Moderated
How do I determine the optimum BUFFER_SIZE when reading from input streams?


*byte[] buffer = byte[ BUFFER_SIZE ];*
int len = -1;

while ((len = in.read(buffer)) != -1)
*{*
*}*

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points