title: How can we read or use the contents of outputstream
body: <p>How can we read or use the contents of outputstream.
  In my case, I am using a method having signature.</p>
  
  <p><strong>public static OutputStream decryptAsStream(InputStream inputStream,
              String encryptionKey)</strong></p>
  
  <p>This method return OutputStream. I want get OutputStream to String.
  Is it possible to pipe the output from an java.io.OutputStream to a String in Java?</p>