Package com.lingocoder.process.io
Class ProcessIO
- java.lang.Object
-
- com.lingocoder.process.io.ProcessIO
-
public class ProcessIO extends java.lang.Object
A 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.String
getStderr()
Access thestderr
produced by running aProcess
.java.lang.String
getStdout()
Access thestdout
produced by running aProcess
.boolean
isOk()
Access the binary flag that indicates the success or failure of running a native operating systemProcess
.java.lang.String
toString()
Map this instance to itsString
representation.
-
-
-
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:
true
if the process ran without errors. Otherwise,false
.
-
getStdout
public java.lang.String getStdout()
Access thestdout
produced 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 thestderr
produced 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 itsString
representation.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A
String
of the form: „ProcessIO{ok=true, stdout='foo...', stderr='boo...'}“.
-
-