I have a function that takes an object of a certain type, and a PrintStream to which to print, and outputs a representation of that object. How can I capture this f
PrintStream
Maybe this question might help you: Get an OutputStream into a String
Subclass OutputStream and wrap it in PrintStream