public class ServletEncoderHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
JPEG_MIME_TYPE |
static String |
PNG_MIME_TYPE |
static String |
SVG_MIME_TYPE |
Constructor and Description |
---|
ServletEncoderHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
encodeJPEG(Chart chart,
float quality,
HttpServletResponse httpServletResponse)
Convenience method to call from a Servlet or JSP.
|
static void |
encodePNG(Chart chart,
HttpServletResponse httpServletResponse)
Convenience method to call from a Servlet or JSP.
|
static void |
encodeServlet(Chart chart,
HttpServletResponse httpServletResponse)
Convenience method to call from a Servlet or JSP.
|
public static final String SVG_MIME_TYPE
public static final String PNG_MIME_TYPE
public static final String JPEG_MIME_TYPE
public static final void encodeServlet(Chart chart, HttpServletResponse httpServletResponse) throws ChartDataException, PropertyException, IOException
chart
- httpServletResponse
- ChartDataException
PropertyException
IOException
public static final void encodeJPEG(Chart chart, float quality, HttpServletResponse httpServletResponse) throws ChartDataException, PropertyException, IOException
chart
- quality
- float value from 0.0f(worst image quality) - 1.0f(best image quality)httpServletResponse
- ChartDataException
PropertyException
IOException
public static final void encodePNG(Chart chart, HttpServletResponse httpServletResponse) throws ChartDataException, PropertyException, IOException
chart
- httpServletResponse
- ChartDataException
PropertyException
IOException