01: package net.sourceforge.pmd.util.designer;
02:
03: import java.io.PrintStream;
04:
05: public class MyPrintStream extends PrintStream {
06:
07: private StringBuffer buf = new StringBuffer();
08:
09: private static final String LINE_SEPARATOR = System
10: .getProperty("line.separator");
11:
12: public MyPrintStream() {
13: super (System.out);
14: }
15:
16: public void println(String s) {
17: super .println(s);
18: buf.append(s);
19: buf.append(LINE_SEPARATOR);
20: }
21:
22: public String getString() {
23: return buf.toString();
24: }
25: }
|