Echo the content of a stream to System.out
with the given prefix.
Definition at line 26 of file SampleOutPrinter.java.
◆ SampleOutPrinter()
org.dartlang.vm.service.SampleOutPrinter.SampleOutPrinter |
( |
String |
prefix, |
|
|
InputStream |
stream |
|
) |
| |
|
inline |
Definition at line 64 of file SampleOutPrinter.java.
64 {
65 this.prefix = prefix;
66 this.reader =
new BufferedReader(
new InputStreamReader(
stream, Charsets.UTF_8));
67 new LinesReaderThread().start();
68 }
◆ assertEmpty()
void org.dartlang.vm.service.SampleOutPrinter.assertEmpty |
( |
| ) |
|
|
inline |
Definition at line 70 of file SampleOutPrinter.java.
70 {
71 synchronized (currentLineLock) {
72 if (currentLine != null) {
73 throw new RuntimeException("Did not expect " + prefix + ": \"" + currentLine + "\"");
74 }
75 }
76 }
◆ assertLastLine()
void org.dartlang.vm.service.SampleOutPrinter.assertLastLine |
( |
String |
text | ) |
|
|
inline |
Definition at line 78 of file SampleOutPrinter.java.
78 {
79 synchronized (currentLineLock) {
81 if (currentLine != null) {
82 throw new RuntimeException("Did not expect " + prefix + ": \"" + currentLine + "\"");
83 }
84 } else {
85 if (currentLine ==
null || !currentLine.contains(
text)) {
86 throw new RuntimeException("Expected current line to contain text\n"
87 +
"\nexpected: [" +
text +
"]"
88 + "\nactual: [" + currentLine + "]");
89 }
90 }
91 }
92 }
The documentation for this class was generated from the following file: