title: Why to use ByteArrayInputStream rather than byte[] in Java
body: <p>As I understand <code>ByteArrayInputStream</code> is used to read <code>byte[]</code> data.
  Why should I use it rather than simple <code>byte[]</code> (for example reading it from DB).</p>
  
  <p>What is the different between them?</p>