This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have this class that as one of the parameters accepts a PrintStream (apparently, since the example uses System.out, which is a PrintStream obj).
Now, how do I read this PrintStream obj? The idea here is ofcource not to use System.out, but an object from where I can then examine the text that is written there and use that in some way, instead of just showing it in the console.
I have checked the API, but dont really find anything usefull. I bet there is a way, but I cant find it.
I think the main problem I did was that the OutObj must have the opposite InObj to work... So, I read same as is written. Anyway, I used ByteArrayOutputStream and ByteArrayInputStream(BOutStream.toByteArray()...) to read that.
Thanks anyway, Daniel
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com