Quantcast
Channel: Convert fileoutputstream to a string - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Convert fileoutputstream to a string

$
0
0

I have a java program where I am writing to a file using OutputStream. Everything is working fine. Upon completion of the program, I see data in my file. However, I would like to see this data on the System.out as well.

How can I convert OutputStream to a String so that I can simply System.out.println(); it? I tried fos.toString() but that prints java.io.FileOutputStream@1ed2e55e


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images