1 |
| package net.sourceforge.pmd.util.designer; |
2 |
| |
3 |
| import java.io.PrintStream; |
4 |
| |
5 |
| public class MyPrintStream extends PrintStream { |
6 |
| |
7 |
| private StringBuffer buf = new StringBuffer(); |
8 |
| |
9 |
| private static final String LINE_SEPARATOR = System.getProperty("line.separator"); |
10 |
| |
11 |
0
| public MyPrintStream() {
|
12 |
0
| super(System.out);
|
13 |
| } |
14 |
| |
15 |
0
| public void println(String s) {
|
16 |
0
| super.println(s);
|
17 |
0
| buf.append(s);
|
18 |
0
| buf.append(LINE_SEPARATOR);
|
19 |
| } |
20 |
| |
21 |
0
| public String getString() {
|
22 |
0
| return buf.toString();
|
23 |
| } |
24 |
| } |
25 |
| |