Class ProcessReader
- java.lang.Object
-
- org.opends.guitools.controlpanel.util.ProcessReader
-
public class ProcessReader extends Object
Class used to write the output and error of a given process in a printstream.
-
-
Constructor Summary
Constructors Constructor Description ProcessReader(Process process, PrintStream printStream, boolean isError)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThrowablegetLastException()Returns the last exception that occurred reading the output (or the error) of the process.voidinterrupt()Interrupts the reading of the output (or error) of the process.voidstartReading()Starts reading the output (or error) of the process.
-
-
-
Constructor Detail
-
ProcessReader
public ProcessReader(Process process, PrintStream printStream, boolean isError)
The constructor.- Parameters:
process- process whose output/error we want to write to the print stream.printStream- the print stream.isError- whether we must write the error (or the output) must be written to the stream.
-
-
Method Detail
-
startReading
public void startReading()
Starts reading the output (or error) of the process.
-
interrupt
public void interrupt()
Interrupts the reading of the output (or error) of the process. The method does not return until the reading is over.
-
getLastException
public Throwable getLastException()
Returns the last exception that occurred reading the output (or the error) of the process.- Returns:
- the last exception that occurred reading the output (or the error) of the process.
-
-