All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.dakusui.cmd.CommandResult Maven / Gradle / Ivy

There is a newer version: 0.0.8
Show newest version
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