Quantcast
Channel: Convert fileoutputstream to a string - Stack Overflow
Browsing index pages (2 articles)

Convert fileoutputstream to a string

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...

View Article


Answer by Jim for Convert fileoutputstream to a string

Use a ByteArrayOutputStream and you can create a string from it. Assuming the 'stream' variable is a reference to your ByteArrayOutputStream in the following example, here's how you could do...

View Article

Browsing index pages (2 articles)


Latest Images