public void run()
    {
        try {
            OutputStream sysoutOutputStream = null;
            if (stdoutFile != null) {
                sysoutOutputStream = openOutputStream(new File(stdoutFile));
            }
            OutputStream stderrOutputStream = null;
            if (stderrFile != null) {
                stderrOutputStream = openOutputStream(new File(stderrFile));
            }

            if (!dontShowStdOut) {
                LogOutputStream branch = new LogOutputStream(LoggerFactory.getLogger("SYSOUT"));
                if (sysoutOutputStream != null) {
                    sysoutOutputStream = new TeeOutputStream(sysoutOutputStream, branch);
                } else {
                    sysoutOutputStream = branch;
                }

                LogOutputStream syserr = new LogOutputStream(LoggerFactory.getLogger("SYSERR"));
                if (stderrOutputStream != null) {
                    stderrOutputStream = new TeeOutputStream(stderrOutputStream, syserr);
                } else {
                    stderrOutputStream = syserr;
                }

            }

            TeeInputStream sysout = new TeeInputStream(stdout, sysoutOutputStream);
            new Thread(new OuputReadingRunnable(sysout, outBuffer), "Process standard out").start();
            TeeInputStream syserr = new TeeInputStream(stderr, stderrOutputStream);
            new Thread(new OuputReadingRunnable(syserr, errBuffer), "Process error").start();
            sendInput();
        } catch (IOException e) {
            throw new IllegalStateException("unable to use the specified log files", e);
        }
    }
public void run ( ) { try { OutputStream sysoutOutputStream = null ; if ( stdoutFile != null ) { sysoutOutputStream = openOutputStream ( new File ( stdoutFile ) ) ; } OutputStream stderrOutputStream = null ; if ( stderrFile != null ) { stderrOutputStream = openOutputStream ( new File ( stderrFile ) ) ; } if ( ! dontShowStdOut ) { LogOutputStream branch = new LogOutputStream ( LoggerFactory . getLogger ( "SYSOUT" ) ) ; if ( sysoutOutputStream != null ) { sysoutOutputStream = new TeeOutputStream ( sysoutOutputStream , branch ) ; } else { sysoutOutputStream = branch ; } LogOutputStream syserr = new LogOutputStream ( LoggerFactory . getLogger ( "SYSERR" ) ) ; if ( stderrOutputStream != null ) { stderrOutputStream = new TeeOutputStream ( stderrOutputStream , syserr ) ; } else { stderrOutputStream = syserr ; } } TeeInputStream sysout = new TeeInputStream ( stdout , sysoutOutputStream ) ; new Thread ( new OuputReadingRunnable ( sysout , outBuffer ) , "Process standard out" ) . start ( ) ; TeeInputStream syserr = new TeeInputStream ( stderr , stderrOutputStream ) ; new Thread ( new OuputReadingRunnable ( syserr , errBuffer ) , "Process error" ) . start ( ) ; sendInput ( ) ; } catch ( IOException e ) { throw new IllegalStateException ( "unable to use the specified log files" , e ) ; } }
<p>run.</p>