|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jfw.util.ExecProgram
public final class ExecProgram
Execute a shell program.
Constructor Summary | |
---|---|
ExecProgram(java.lang.String programToExec)
Create an instance. |
|
ExecProgram(java.lang.String[] programToExec)
Create an instance. |
|
ExecProgram(java.lang.String[] programToExec,
java.lang.String[] env)
Create an instance. |
|
ExecProgram(java.lang.String[] programToExec,
java.lang.String[] env,
java.lang.String workingDirectory)
Create an instance. |
|
ExecProgram(java.lang.String programToExec,
java.lang.String[] env)
Create an instance. |
|
ExecProgram(java.lang.String programToExec,
java.lang.String[] env,
java.lang.String workingDirectory)
Create an instance. |
Method Summary | |
---|---|
void |
close()
Call methods closeStreams() and stopProcess() |
void |
closeStreams()
Close the streams. |
void |
finalize()
Call super.finalize() and method close() . |
java.io.BufferedReader |
getError()
Get the error output stream. |
java.io.BufferedReader |
getOutput()
Get the standard output stream. |
java.lang.Process |
getProcess()
Get attribute currentProcess . |
java.lang.String |
readErrorLine()
Get next line from the error stream. |
java.lang.String |
readLine()
Get next line from the standard stream. |
java.lang.String |
showOutput()
Return the string contrent saved in outputHistory . |
void |
stopProcess()
Stop the process. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExecProgram(java.lang.String programToExec) throws JFWGenericException
programToExec
- the program to execute with absolute path.
JFWGenericException
public ExecProgram(java.lang.String programToExec, java.lang.String[] env) throws JFWGenericException
programToExec
- the program to execute with absolute path.env
- environment parameters.
JFWGenericException
public ExecProgram(java.lang.String[] programToExec) throws JFWGenericException
programToExec
- the program to execute in index 0 and after
the program parameters.
JFWGenericException
public ExecProgram(java.lang.String[] programToExec, java.lang.String[] env) throws JFWGenericException
programToExec
- the program to execute in index 0 and after
the program parameters.env
- environment parameters.
JFWGenericException
public ExecProgram(java.lang.String programToExec, java.lang.String[] env, java.lang.String workingDirectory) throws JFWGenericException
programToExec
- the program to execute with realtive path.env
- environment parameters.workingDirectory
- the working directrory
JFWGenericException
public ExecProgram(java.lang.String[] programToExec, java.lang.String[] env, java.lang.String workingDirectory) throws JFWGenericException
programToExec
- the program to execute in index 0 and after
the program parameters.env
- environment parameters.workingDirectory
- the working directrory
JFWGenericException
Method Detail |
---|
public java.io.BufferedReader getOutput()
public java.io.BufferedReader getError()
public java.lang.String readLine() throws JFWGenericException
outputHistory
.
JFWGenericException
public java.lang.String readErrorLine() throws JFWGenericException
JFWGenericException
public java.lang.String showOutput()
outputHistory
.
outputHistory
.public java.lang.Process getProcess()
currentProcess
.
currentProcess
.public void closeStreams()
public void stopProcess()
public void close()
closeStreams()
and stopProcess()
public void finalize() throws java.lang.Throwable
close()
.
finalize
in class java.lang.Object
java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |