System.out & ByteArrayOutputStream
System.out & ByteArrayOutputStream
- Subject: System.out & ByteArrayOutputStream
- From: Nathan Dumar <email@hidden>
- Date: Wed, 10 Nov 2004 13:51:38 -0500
I'm reading the docs but coming up short. I want to send an email when
I get a message posted to System.out or System.err. So far, I have ...
// none of this has been tested yet
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintStream ps = new PrintStream(baos);
System.setOut(ps);
System.setErr(ps);
I can do baos.toString() to get the String I need for the body of the
email. The problem is that when my ByteArrayOutputStream baos gets
written to, I need to do stuff, then send the email.
I can't figure out a way to set off another method after baos gets
data. Any ideas?
Thank you,
Nathan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden