Package org.knowm.xchart
Class VectorGraphicsEncoder
- java.lang.Object
-
- org.knowm.xchart.VectorGraphicsEncoder
-
public final class VectorGraphicsEncoder extends java.lang.ObjectA helper class with static methods for saving Charts as vectors
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classVectorGraphicsEncoder.PDFBoxProcessorstatic classVectorGraphicsEncoder.VectorGraphicsFormat
-
Constructor Summary
Constructors Modifier Constructor Description privateVectorGraphicsEncoder()Constructor - Private constructor to prevent instantiation
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringaddFileExtension(java.lang.String fileName, VectorGraphicsEncoder.VectorGraphicsFormat vectorGraphicsFormat)Only adds the extension of the VectorGraphicsFormat to the filename if the filename doesn't already have it.static voidsaveVectorGraphic(Chart chart, java.io.OutputStream os, VectorGraphicsEncoder.VectorGraphicsFormat vectorGraphicsFormat)Write a chart to an OutputStream.static voidsaveVectorGraphic(Chart chart, java.lang.String fileName, VectorGraphicsEncoder.VectorGraphicsFormat vectorGraphicsFormat)Write a chart to a file.
-
-
-
Method Detail
-
saveVectorGraphic
public static void saveVectorGraphic(Chart chart, java.lang.String fileName, VectorGraphicsEncoder.VectorGraphicsFormat vectorGraphicsFormat) throws java.io.IOException
Write a chart to a file.- Throws:
java.io.IOException
-
saveVectorGraphic
public static void saveVectorGraphic(Chart chart, java.io.OutputStream os, VectorGraphicsEncoder.VectorGraphicsFormat vectorGraphicsFormat) throws java.io.IOException
Write a chart to an OutputStream.- Throws:
java.io.IOException
-
addFileExtension
public static java.lang.String addFileExtension(java.lang.String fileName, VectorGraphicsEncoder.VectorGraphicsFormat vectorGraphicsFormat)Only adds the extension of the VectorGraphicsFormat to the filename if the filename doesn't already have it.- Parameters:
fileName-vectorGraphicsFormat-- Returns:
- filename (if extension already exists), otherwise;: filename + "." + extension
-
-