public static void saveSvgFile ( final SVGGraphics2D graphics2d , final File path ) throws IOException { try ( FileOutputStream fs = new FileOutputStream ( path ) ; OutputStreamWriter outputStreamWriter = new OutputStreamWriter ( fs , StandardCharsets . UTF_8 ) ; Writer osw = new BufferedWriter ( outputStreamWriter ) ) { graphics2d . stream ( osw , true ) ; } }
Save a SVG graphic to the given path .