title: Output a byte stream to stdout
body: <p>I have following function, which decrypts a base64 file and writes it to a txt file. However, instead of it writing to a text file, I want it to output to stdout. Can you please suggest how we could do that</p>
  
  <pre><code>CipherOutputStream cos = new CipherOutputStream(os, cipher);
      doCopy(is, cos);
  
  }
  
  public static void doCopy(InputStream is, OutputStream os) throws IOException {
      byte[] bytes = new byte[64];
      int numBytes;
      while ((numBytes = is.read(bytes)) != -1) {
          os.write(bytes, 0, numBytes);
      }
  </code></pre>
  
  <p>So instead of os.write writing the stream to a txt file, it should write it to stdout.</p>