Package net.sourceforge.plantuml

Examples of net.sourceforge.plantuml.FileFormatOption


            String text = doc.getStringValue();
            SourceStringReader reader = new SourceStringReader(text);

            FileFormat fmt = "svg".equals(format) ? FileFormat.SVG : FileFormat.PNG;

            String desc = reader.generateImage(baos, new FileFormatOption(fmt));
            if (desc == null) {
                throw new XProcException("PlantUML diagram returned null");
            }
        } catch (XProcException e) {
            throw e;
View Full Code Here


    private void handleImageProxy(HttpServletResponse response, String num, String source) throws IOException {
        SourceStringReader reader = new SourceStringReader(getSource(source));
        int n = num == null ? 0 : Integer.parseInt(num);

        reader.generateImage(response.getOutputStream(), n, new FileFormatOption(getOutputFormat(), false));
    }
View Full Code Here

            // 2009 dec 22 constant date in the past
            response.addHeader("Cache-Control", "public");
        }
        response.setContentType("image/png");
        SourceStringReader reader = new SourceStringReader(uml);
        reader.generateImage(response.getOutputStream(), new FileFormatOption(FileFormat.PNG, false));
    }
View Full Code Here

        if (StringUtils.isDiagramCacheable(uml)) {
            addHeaderForCache();
        }
        response.setContentType(getContentType());
        SourceStringReader reader = new SourceStringReader(uml);
        reader.generateImage(response.getOutputStream(), new FileFormatOption(format, false));
    }
View Full Code Here

        if (StringUtils.isDiagramCacheable(uml)) {
            addHeaderForCache();
        }
        response.setContentType(getContentType());
        SourceStringReader reader = new SourceStringReader(uml);
        String map = reader.generateImage(new NullOutputStream(), new FileFormatOption(FileFormat.PNG, false));
        String[] mapLines = map.split("[\\r\\n]");
        PrintWriter httpOut = response.getWriter();
        for (int i = 2; (i + 1) < mapLines.length; i++) {
            httpOut.print(mapLines[i]);
        }
View Full Code Here

    void sendCheck(String uml) throws IOException {
        response.setContentType(getContentType());
        SourceStringReader reader = new SourceStringReader(uml);
        DiagramDescription desc = reader.generateDiagramDescription(
            new NullOutputStream(), new FileFormatOption(FileFormat.PNG, false));
        PrintWriter httpOut = response.getWriter();
        httpOut.print(desc.getDescription());
}
View Full Code Here

TOP

Related Classes of net.sourceforge.plantuml.FileFormatOption

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.