| | |
| | | * information: "Portions Copyright [year] [name of copyright owner]". |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | * Portions Copyright 2015-2016 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.util; |
| | |
| | | import java.io.InputStreamReader; |
| | | import java.io.PrintStream; |
| | | |
| | | /** |
| | | * Class used to write the output and error of a given process in a printstream. |
| | | * |
| | | */ |
| | | /** Class used to write the output and error of a given process in a printstream. */ |
| | | public class ProcessReader |
| | | { |
| | | private BufferedReader reader; |
| | |
| | | |
| | | readerThread = new Thread(new Runnable() |
| | | { |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void run() |
| | | { |
| | | String line; |
| | |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * Starts reading the output (or error) of the process. |
| | | * |
| | | */ |
| | | /** Starts reading the output (or error) of the process. */ |
| | | public void startReading() |
| | | { |
| | | readerThread.start(); |
| | |
| | | /** |
| | | * Interrupts the reading of the output (or error) of the process. The method |
| | | * does not return until the reading is over. |
| | | * |
| | | */ |
| | | public void interrupt() |
| | | { |