Class SVGUtils
java.lang.Object
org.jfree.graphics2d.svg.SVGUtils
-
Method Summary
Modifier 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.
-
Method Details
-
escapeForXML
Returns a new string where any special characters in the source string have been encoded.- Parameters:
source- the source string (nullnot permitted).- Returns:
- A new string with special characters escaped for XML.
- Since:
- 1.5
-
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.- Since:
- 1.2
-
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.- Since:
- 3.0
-
writeToHTML
Writes an HTML file containing an SVG element.- Parameters:
file- the file.title- the title.svgElement- the SVG element.- Throws:
IOException- if there is an I/O problem.
-