java.lang.Object
org.jfree.svg.SVGUtils
Utility methods related to the
SVGGraphics2D implementation.Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionstatic StringescapeForXML(String source) Returns a new string where any special characters in the source string have been encoded.static voidwriteToHTML(File file, String title, String svgElement) Writes an HTML file containing an SVG element.static voidwriteToSVG(File file, String svgElement) Writes a file containing the SVG element.static voidwriteToSVG(File file, String svgElement, boolean zip) Writes a file containing the SVG element.
Constructor Details
SVGUtils
private SVGUtils()Utility class, not intended for instantiation.
Method Details
escapeForXML
writeToSVG
Writes a file containing the SVG element.- Parameters:
file- the file (nullnot permitted).svgElement- the SVG element (nullnot permitted).- Throws:
IOException- if there is an I/O problem.
writeToSVG
Writes a file containing the SVG element.- Parameters:
file- the file (nullnot permitted).svgElement- the SVG element (nullnot permitted).zip- compress the output.- Throws:
IOException- if there is an I/O problem.
writeToHTML
Writes an HTML file containing an SVG element.- Parameters:
file- the HTML file to write.title- the document title to embed in the pagesvgElement- the SVG element.- Throws:
IOException- if there is an I/O problem.