Package tcg.common.util

Examples of tcg.common.util.StreamGobbler


      logger.info(name + " Exec: " + cmd);
      Runtime rt = Runtime.getRuntime();
          Process proc = rt.exec(cmd);
         
          // any error message?
          StreamGobbler errorGobbler = new
              StreamGobbler(proc.getErrorStream(), name + " ERROR", logger);           
         
          // any output?
          StreamGobbler outputGobbler = new
              StreamGobbler(proc.getInputStream(), name + " OUTPUT", logger);
             
          // kick them off
          errorGobbler.start();
          outputGobbler.start();
                                 
          // any error???
          int exitVal = proc.waitFor();
          logger.info(name + " ExitValue: " + exitVal);
    }
View Full Code Here

TOP

Related Classes of tcg.common.util.StreamGobbler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.