ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintWriter out = new PrintWriter(baos);
Injector injector = Guice.createInjector(new GrapherModule(),
new GraphvizModule());
GraphvizRenderer renderer = injector
.getInstance(GraphvizRenderer.class);
renderer.setOut(out).setRankdir("TB");
injector.getInstance(InjectorGrapher.class).of(inj).graph();
out = new PrintWriter(new File(filename), "UTF-8");
String s = baos.toString("UTF-8");