Convert a StreamWriter to an OutputStream in java?
Asked 2009-02-19T14:20:59.213
14
I am trying to redirect System.out into a String using System.setOut, which takes a PrintStream. Is there any way to convert a StringWriter into a Stream so that I can pass it to setOut?