StringTokenizer tokenizer = new StringTokenizer(reader.readLine()); tokenizer.nextToken(); tokenizer.nextToken(); tempVersion = tokenizer.nextToken();
String versionLine = reader.readLine(); StringTokenizer tokenizer = new StringTokenizer(versionLine); if (tokenizer.nextToken().equals("dot")) { tokenizer.nextToken(); tempVersion = tokenizer.nextToken(); } else { System.err.println("Invalid dot configuration detected.  '" + dotCommand + "' returned:"); System.err.println("   " + versionLine); }
    private Dot() {        String tempVersion = null;        try {            String dotCommand = "dot -V";            Process process = Runtime.getRuntime().exec(dotCommand);            BufferedReader reader = new BufferedReader(new InputStreamReader(process.getErrorStream()));            StringTokenizer tokenizer = new StringTokenizer(reader.readLine());            tokenizer.nextToken(); // skip 'dot'            tokenizer.nextToken(); // skip 'version'            tempVersion = tokenizer.nextToken();        } catch (Exception validDotDoesntExist) {        }        version = new Version(tempVersion);    }