support multiple configuration

This commit is contained in:
Andreas Penski 2021-05-21 11:16:20 +00:00
parent 730d7fefe9
commit 2e6efdd16f
59 changed files with 1136 additions and 608 deletions

View file

@ -114,22 +114,22 @@ public class CommandLine {
}
public static String getOutput() {
return new String(out.getOut().toByteArray());
return out.getOut().toString();
}
public static String getErrorOutput() {
return new String(error.getOut().toByteArray());
return error.getOut().toString();
}
public List<String> getOutputLines() {
public static List<String> getOutputLines() {
return readLines(out.getOut().toByteArray());
}
public List<String> getErrorLines() {
public static List<String> getErrorLines() {
return readLines(error.getOut().toByteArray());
}
private List<String> readLines(final byte[] bytes) {
private static List<String> readLines(final byte[] bytes) {
try ( final ByteArrayInputStream in = new ByteArrayInputStream(bytes);
final Reader r = new InputStreamReader(in) ) {