/**
  * <p>StreamGobbler constructor</p>
  *
  * <p>We use this class because shell STDOUT and STDERR should be read as quickly as
  * possible to prevent a deadlock from occurring, or Process.waitFor() never
  * returning (as the buffer is full, pausing the native process)</p>
  *
  * @param shell Name of the shell
  * @param inputStream InputStream to read from
  * @param onLineListener OnLineListener callback
  */
 public StreamGobbler(string shell, System.IO.Stream inputStream, IOnLineListener onLineListener)
 {
     this.shell = shell;
     reader     = new BufferedReader(new InputStreamReader(inputStream));
     listener   = onLineListener;
 }
示例#2
0
 /**
  * <p>StreamGobbler constructor</p>
  *
  * <p>We use this class because shell STDOUT and STDERR should be read as quickly as
  * possible to prevent a deadlock from occurring, or Process.waitFor() never
  * returning (as the buffer is full, pausing the native process)</p>
  *
  * @param shell Name of the shell
  * @param inputStream InputStream to read from
  * @param onLineListener OnLineListener callback
  */
 public StreamGobbler(string shell, System.IO.Stream inputStream, IOnLineListener onLineListener)
 {
     this.shell = shell;
     reader = new BufferedReader(new InputStreamReader(inputStream));
     listener = onLineListener;
 }