title: Can we convert a byte array into an InputStream in Java?
body: <p>Can we convert a byte array into an InputStream in Java? I have been looking on the internet but couldn't find it.</p>
  
  <p>I have a method that has an InputStream as argument.</p>
  
  <p>The InputStream <code>cph</code> I have is base64 encoded so I had to decode it using</p>
  
  <pre><code>BASE64Decoder decoder = new BASE64Decoder();
  byte[] decodedBytes = decoder.decodeBuffer(cph);
  </code></pre>
  
  <p>Now how do I convert <code>decodedBytes</code> again to <code>InputStream</code>?</p>