title: Java 1.8 and below equivalent for InputStream.readAllBytes()
body: <p>I wrote a program that gets all bytes from an <code>InputStream</code> in <strong>Java 9</strong> with</p>
  
  <pre><code>InputStream.readAllBytes()
  </code></pre>
  
  <p>Now, I want to export it to <strong>Java 1.8 and below</strong>. Is there an equivalent function? Couldn't find one.</p>