Package de.hsh.graja.util
Class ProcessBuilderWrapper
- java.lang.Object
-
- de.hsh.graja.util.ProcessBuilderWrapper
-
public class ProcessBuilderWrapper extends Object
-
-
Constructor Summary
Constructors Constructor Description ProcessBuilderWrapper(File directory, List<String> command)
ProcessBuilderWrapper(String... command)
ProcessBuilderWrapper(List<String> command)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
directory()
ProcessBuilderWrapper
directory(File directory)
Map<String,String>
environment()
String
getErrorOutput()
String
getOutput()
int
getStatus()
ProcessBuilderWrapper
redirectErrorStream(boolean redirectErrorStream)
int
startGrabOutputWaitForAndDestroy(int timeoutSeconds)
-
-
-
Method Detail
-
getErrorOutput
public String getErrorOutput()
-
getOutput
public String getOutput()
-
getStatus
public int getStatus()
-
directory
public File directory()
-
directory
public ProcessBuilderWrapper directory(File directory)
-
redirectErrorStream
public ProcessBuilderWrapper redirectErrorStream(boolean redirectErrorStream)
-
startGrabOutputWaitForAndDestroy
public int startGrabOutputWaitForAndDestroy(int timeoutSeconds) throws IOException, InterruptedException
- Parameters:
timeoutSeconds
- 0 means no timeout- Throws:
IOException
InterruptedException
-
-