Package helpers

Examples of helpers.StreamGobbler


    ProcessBuilder pb = new ProcessBuilder(args);
    pb.directory(new File(path));

    Process sumo = pb.start();

    StreamGobbler gi = new StreamGobbler(sumo.getInputStream());
    StreamGobbler ge = new StreamGobbler(sumo.getErrorStream());

    gi.start();
    ge.start();

    int exitvalue = sumo.waitFor();

    gi.stop();
    ge.stop();

    List<String> gir = gi.getReadLines();
    List<String> ger = ge.getReadLines();

    for (String s : ger) {
      System.out.println(s);
    }
  }
View Full Code Here


        ProcessBuilder pb = new ProcessBuilder(args);
        pb.directory(new File(sim.getExportPath()));

        Process dua = pb.start();

        StreamGobbler gi = new StreamGobbler(dua.getInputStream());
        StreamGobbler ge = new StreamGobbler(dua.getErrorStream());

        gi.start();
        ge.start();

        int exitvalue = dua.waitFor();

        gi.stop();
        ge.stop();

        List<String> gir = gi.getReadLines();
        List<String> ger = ge.getReadLines();

        for (String s : ger) {
          System.out.println(s);
        }
      } catch (Exception e) {
View Full Code Here

TOP

Related Classes of helpers.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.