cynosurex.lang
Class Executor
java.lang.Object
cynosurex.lang.Executor
- All Implemented Interfaces:
- cynosurex.internal.AuthorCommon, cynosurex.internal.CommonInterface, cynosurex.internal.CompanyCommon
public class Executor
- extends java.lang.Object
- implements cynosurex.internal.CommonInterface
This class provides simple command execution interface.
- Version:
- 1.0
- Author:
- Chieh Cheng
Fields inherited from interface cynosurex.internal.CommonInterface |
copyright, copyrightYears, notice, program, version |
Fields inherited from interface cynosurex.internal.AuthorCommon |
author, copyrightSymbol, noticeMsg, rights |
Fields inherited from interface cynosurex.internal.CompanyCommon |
company, email, website |
Method Summary |
java.lang.String |
execute(java.lang.String command)
This method executes the command specified. |
java.lang.String |
getErrorText()
This method returns the stderr of the last command executed. |
java.lang.String |
getOutputText()
This method returns the stdout of the last command executed. |
java.lang.Process |
getProcess()
This method returns the last execution process. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Executor
public Executor()
execute
public java.lang.String execute(java.lang.String command)
throws java.io.IOException,
java.lang.InterruptedException
- This method executes the command specified.
It returns the stdout as a convenience.
- Throws:
java.io.IOException
java.lang.InterruptedException
getProcess
public java.lang.Process getProcess()
- This method returns the last execution process.
If no command has been executed yet, then it returns null.
getErrorText
public java.lang.String getErrorText()
- This method returns the stderr of the last command executed.
getOutputText
public java.lang.String getOutputText()
- This method returns the stdout of the last command executed.