title: How do you decide what byte[] size to use for InputStream.read()?
body: <p>When reading from InputStreams, how do you decide what size to use for the byte[]?  </p>
  
  <pre><code>int nRead;
  byte[] data = new byte[16384]; // &lt;-- this number is the one I'm wondering about
  
  while ((nRead = is.read(data, 0, data.length)) != -1) {
    ...do something..
  }
  </code></pre>
  
  <p>When do you use a small one vs a large one? What are the differences? Does the number want to be in increments of 1024? Does it make a difference if it is an InputStream from the network vs the disk?</p>
  
  <p>Thanks much, I can't seem to find a clear answer elsewhere.</p>