public byte [ ] getGraph ( String dot_source , String type ) throws GraphVizException { File dot ; byte [ ] img_stream = null ; try { dot = writeDotSourceToFile ( dot_source ) ; if ( dot != null ) { img_stream = get_img_stream ( dot , type ) ; if ( ! dot . delete ( ) ) { throw new GraphVizException ( "Warning: " + dot . getAbsolutePath ( ) + " could not be deleted!" ) ; } return img_stream ; } return null ; } catch ( IOException ioe ) { return null ; } }
Returns the graph as an image in binary format .