public static void printGraph(SIRStream str, String filename) { try { FileOutputStream out = new FileOutputStream(filename); StreamItDot dot = new StreamItDot(new PrintStream(out)); dot.print("digraph streamit {\n"); str.accept(dot); dot.print("}\n"); out.flush(); out.close(); } catch (IOException e) { e.printStackTrace(); }
public static void printGraph(SIRStream str) { str.accept(new StreamItDot(System.out));
    public static void printGraph(SIRStream str, String filename) {	try {	    FileOutputStream out = new FileOutputStream(filename);	    StreamItDot dot = new StreamItDot(new PrintStream(out));	    dot.print("digraph streamit {\n");	    str.accept(dot);	    dot.print("}\n");	    out.flush();	    out.close();	} catch (IOException e) {	    e.printStackTrace();	}    }