
com.github.dakusui.cmd.CommandResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commandrunner Show documentation
Show all versions of commandrunner Show documentation
Command line runner library for Java
package com.github.dakusui.cmd;
import com.github.dakusui.cmd.Command.Buffer;
import com.github.dakusui.cmd.Command.SourceType;
public class CommandResult {
private Buffer buffer;
private int exitCode;
public CommandResult(int exitCode, Buffer buffer) {
this.buffer = buffer;
this.exitCode = exitCode;
}
public String stdout() {
return this.buffer.asString(SourceType.STDOUT);
}
public String stderr() {
return this.buffer.asString(SourceType.STDERR);
}
public String asString() {
return this.buffer.asString(null);
}
public int exitCode() {
return this.exitCode;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy