public static BufferedImage renderDOTImage(Reader dotReader) throws IOException {
        InputStream pngIs = runDOT(dotReader, "png");
        BufferedImage img = ImageIO.read(pngIs);
        pngIs.close();

        return img;
    }
public static BufferedImage renderDOTImage ( Reader dotReader ) throws IOException { InputStream pngIs = runDOT ( dotReader , "png" ) ; BufferedImage img = ImageIO . read ( pngIs ) ; pngIs . close ( ) ; return img ; }
Reads a DOT description from a reader and returns the PNG rendering result as a {@link BufferedImage}.

@param dotReader
the reader from which to read the description

@return the rendering result

@throws IOException
if reading from the reader fails, or the pipe to the DOT process breaks.