Package wt.util
Class ProcessLauncher
java.lang.Object
wt.util.ProcessLauncher
Performs the process using another thread to start sending output, before processing has completed.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intLaunch the subprocess and wait for it to complete.voidsetErrorStream(PrintStream error_stream) The errors from the process and local class methods will be written to this PrintStream, for reading to begin before processing completes.voidsetErrorWriter(PrintWriter error_writer) The errors from the process and local class methods will be written to this PrintWriter, for reading to begin after the process completes.voidsetOutStream(PrintStream out_stream) The output from the process's output stream will be written to this PrintStream, for reading to begin before processing completes.voidsetOutWriter(PrintWriter out_writer) The output from the process's output stream will be written to this PrintWriter, for reading to begin after the process completes.
-
Constructor Details
-
ProcessLauncher
Deprecated.Create an instance to run the command. Escapes windows commands as documented here: http://bugs.sun.com/view_bug.do?bug_id=6511002
Supported API: true- Parameters:
command- Process this command.
-
-
Method Details
-
setErrorWriter
The errors from the process and local class methods will be written to this PrintWriter, for reading to begin after the process completes. Will only take effect if invoked prior to runProcess().
Supported API: true- Parameters:
error_writer- After processing completes, review errors from here.
-
setOutWriter
The output from the process's output stream will be written to this PrintWriter, for reading to begin after the process completes. Will only take effect if invoked prior to runProcess().
Supported API: true- Parameters:
out_writer- After processing completes, review the process' progression from here.
-
setErrorStream
The errors from the process and local class methods will be written to this PrintStream, for reading to begin before processing completes. Will only take effect if invoked prior to runProcess().
Supported API: true- Parameters:
error_stream- While still processing, look at errors from here.
-
setOutStream
The output from the process's output stream will be written to this PrintStream, for reading to begin before processing completes. Will only take effect if invoked prior to runProcess().
Supported API: true- Parameters:
out_stream- While still processing, look at the process' progression from here.
-
runProcess
Launch the subprocess and wait for it to complete.
Supported API: true- Returns:
- the return code of the subprocess
- Throws:
IOException- Forwarded from runProcess(long,long).
-