@Override public void writeTo(OutputStream outputStream) throws IOException { PrintWriter pw = new PrintWriter(new OutputStreamWriter(outputStream, Charsets.UTF_8)); for (FlowExecution flow : FlowExecutionList.get()) { if (flow instanceof CpsFlowExecution) { pw.println("Build: " + flow.getOwner().getExecutable()); ((CpsFlowExecution) flow).getThreadDump().print(pw); pw.println("Approximate graph size: " + ((CpsFlowExecution) flow).approximateNodeCount()); pw.println(); } } pw.flush(); } });