Package com.lingocoder.process.io
Class ProcessIO
- java.lang.Object
-
- com.lingocoder.process.io.ProcessIO
-
public class ProcessIO extends java.lang.ObjectA POJO that contains the results of theProcessHelper.
-
-
Constructor Summary
Constructors Constructor Description ProcessIO(boolean ok, java.lang.String stdout, java.lang.String stderr)Create an immutable instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetStderr()Access thestderrproduced by running aProcess.java.lang.StringgetStdout()Access thestdoutproduced by running aProcess.booleanisOk()Access the binary flag that indicates the success or failure of running a native operating systemProcess.java.lang.StringtoString()Map this instance to itsStringrepresentation.
-
-
-
Constructor Detail
-
ProcessIO
public ProcessIO(boolean ok, java.lang.String stdout, java.lang.String stderr)Create an immutable instance.- Parameters:
ok- A binary flag indicating the success or failure of running a native operating systemProcess.stdout- The output message produced by the successful running of a native operating systemProcess.stderr- The error message produced by the unsuccessful running of a native operating systemProcess.
-
-
Method Detail
-
isOk
public boolean isOk()
Access the binary flag that indicates the success or failure of running a native operating systemProcess.- Returns:
trueif the process ran without errors. Otherwise,false.
-
getStdout
public java.lang.String getStdout()
Access thestdoutproduced by running aProcess.- Returns:
- The output message produced by the successful running of a native operating system
Process.
-
getStderr
public java.lang.String getStderr()
Access thestderrproduced by running aProcess.- Returns:
- The error message produced by the unsuccessful running of a native operating system
Process.
-
toString
public java.lang.String toString()
Map this instance to itsStringrepresentation.- Overrides:
toStringin classjava.lang.Object- Returns:
- A
Stringof the form: „ProcessIO{ok=true, stdout='foo...', stderr='boo...'}“.
-
-