Does Anyone have the slightest idea on how to reset System.out?
I have temporarily channeled the System.out.println using System.setOut:
biteMe = new ByteArrayOutputStream();
System.setOut(new PrintStream(biteMe,true));
But... now I want to set it back to default (screen window) etc.
Any clues??? Help Greatly Appreciated... No previous info found through search & Thanks inAdv
Re: Does Anyone have the slightest idea on how to reset System.out?
Hi there
Before you use setOut, you can create
a reference to dos's output ie :
// Note you must do this before you change System.out so that you can get this reference
OutputStream outs = System.out;
PrintStream dos = new PrintStream(outs);
Then later when you want to print back in dos
you can do this:
System.setOut(dos);
Good luck
Phill.