public class FileExecutor
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
FileExecutor.MonitorInputStream
This is a grabber for stdout and stderr.
|
Modifier and Type | Field and Description |
---|---|
private java.util.Collection |
files
The files to execute.
|
Constructor and Description |
---|
FileExecutor()
Constructs a new executor.
|
FileExecutor(java.util.Collection files)
Constructs a new executor.
|
Modifier and Type | Method and Description |
---|---|
int |
executeCommand(java.lang.String[] params,
java.lang.String[] output)
Executed a system command and waits for completion.
|
int |
executeFiles(int currentStage,
AbstractUIHandler handler)
Executes files specified at construction time.
|
private boolean |
stopThread(java.lang.Thread t,
FileExecutor.MonitorInputStream m) |
public FileExecutor(java.util.Collection files)
files
- the executable files to processpublic FileExecutor()
private boolean stopThread(java.lang.Thread t, FileExecutor.MonitorInputStream m)
public int executeCommand(java.lang.String[] params, java.lang.String[] output)
params
- system command as string arrayoutput
- contains output of the command index 0 = standard output index 1 = standard
errorpublic int executeFiles(int currentStage, AbstractUIHandler handler)
currentStage
- the stage of the installationhandler
- The AbstractUIHandler to notify on errors.