|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.izforge.izpack.util.FileExecutor
public class FileExecutor
Executes a bunch of files. This class is intended to do a system dependent installation postprocessing. Executable file can be any file installed with current package. After execution the file can be optionally removed. Before execution on Unix systems execution flag will be set on processed file.
Nested Class Summary | |
---|---|
private static class |
FileExecutor.MonitorInputStream
This is a grabber for stdout and stderr. |
Field Summary | |
---|---|
private java.util.Collection |
files
The files to execute. |
Constructor Summary | |
---|---|
FileExecutor()
Constructs a new executor. |
|
FileExecutor(java.util.Collection files)
Constructs a new executor. |
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.Collection files
Constructor Detail |
---|
public FileExecutor(java.util.Collection files)
files
- the executable files to processpublic FileExecutor()
Method Detail |
---|
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
error
public int executeFiles(int currentStage, AbstractUIHandler handler)
currentStage
- the stage of the installationhandler
- The AbstractUIHandler to notify on errors.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |