private void consumeLine( String line ) throws IOException { if ( consumer != null && !isDisabled() ) { consumer.consumeLine( line ); } } }
outputPumper = new StreamPumper( p.getInputStream(), systemOut ); outputPumper.start(); errorPumper = new StreamPumper( p.getErrorStream(), systemErr ); errorPumper.start(); outputPumper.waitUntilDone(); errorPumper.waitUntilDone(); if ( outputPumper.getException() != null ) throw new CommandLineException( "Failure processing stdout.", outputPumper.getException() ); if ( errorPumper.getException() != null ) throw new CommandLineException( "Failure processing stderr.", errorPumper.getException() ); outputPumper.disable(); errorPumper.disable();