Yes, Darren's suggestion would be the first choice, if possible. Or better, fix the evil LoadedClass so it doesn't dump important info to System.out and err. Otherwise you're basically looking for the opposite of an OutputStreamWriter.
Java doesn't seem to provide anything like this, but you can make one:
This uses a plain OutputStream rather than PrintStream for maximum flexiblilty. To use it in your program, just wrap with a PrintStream.
Note that WriterOutputStream will only work reliably if the platform default encoding is a single-byte encoding. Which it usually is. But if it's UTF-8 or UTF-16 or some more exotic encoding, you may have problems if write() contains any incomplete byte sequences. E.g. if you use write(byte) for the first byte of a two-byte character, or if the last byte in a byte[] array is the first of a two-byte character, then that byte will be lost. And the next byte written will also be misinterpreted as a result. That won't be a problem on most systems, but if it is, you may need to do something more complex. Maybe involving a java.nio.charset.CharsetDecoder, which has the ability to tell you when there are leftover bytes that haven't been encoded yet. Or maybe there's a simpler trick which I'm overlooking.
Again, it would really be preferable to either fix the LoadedClass so it doesn't use System.out, or alter the calling method to remove the need for PrintWriters. But if you can't, it's still possible to proceed, carefully.
[ May 25, 2007: Message edited by: Jim Yingst ]