equal
deleted
inserted
replaced
25 |
25 |
26 import jdk.test.lib.Asserts; |
26 import jdk.test.lib.Asserts; |
27 |
27 |
28 import java.io.IOException; |
28 import java.io.IOException; |
29 import java.io.PrintStream; |
29 import java.io.PrintStream; |
|
30 import java.nio.charset.Charset; |
30 import java.nio.file.Files; |
31 import java.nio.file.Files; |
31 import java.nio.file.Path; |
32 import java.nio.file.Path; |
32 import java.util.Arrays; |
33 import java.util.Arrays; |
33 import java.util.List; |
34 import java.util.List; |
34 import java.util.stream.Collectors; |
35 import java.util.stream.Collectors; |
36 import java.util.regex.Pattern; |
37 import java.util.regex.Pattern; |
37 |
38 |
38 public final class OutputAnalyzer { |
39 public final class OutputAnalyzer { |
39 |
40 |
40 private final OutputBuffer buffer; |
41 private final OutputBuffer buffer; |
|
42 /** |
|
43 * Create an OutputAnalyzer, a utility class for verifying output and exit |
|
44 * value from a Process |
|
45 * |
|
46 * @param process Process to analyze |
|
47 * @param cs The charset used to convert stdout/stderr from bytes to chars |
|
48 * or null for the default charset. |
|
49 * @throws IOException If an I/O error occurs. |
|
50 */ |
|
51 public OutputAnalyzer(Process process, Charset cs) throws IOException { |
|
52 buffer = OutputBuffer.of(process, cs); |
|
53 } |
41 /** |
54 /** |
42 * Create an OutputAnalyzer, a utility class for verifying output and exit |
55 * Create an OutputAnalyzer, a utility class for verifying output and exit |
43 * value from a Process |
56 * value from a Process |
44 * |
57 * |
45 * @param process Process to analyze |
58 * @param process Process to analyze |