Example usage for org.jfree.chart.encoders SunJPEGEncoderAdapter SunJPEGEncoderAdapter

List of usage examples for org.jfree.chart.encoders SunJPEGEncoderAdapter SunJPEGEncoderAdapter

Introduction

In this page you can find the example usage for org.jfree.chart.encoders SunJPEGEncoderAdapter SunJPEGEncoderAdapter.

Prototype

public SunJPEGEncoderAdapter() 

Source Link

Document

Creates a new SunJPEGEncoderAdapter instance.

Usage

From source file:com.orange.atk.atkUI.coregui.StatisticTool.java

/**
 * Creates a jpeg file with the generated chart
 * /*from  www. java  2s.com*/
 * @param outFilePath
 *            the path to the output file
 */
public void createJPEGFile(File outFile) {
    try {
        FileOutputStream outputStream = new FileOutputStream(outFile);
        BufferedImage bufferedImage = jfreechart.createBufferedImage(550, 270);
        SunJPEGEncoderAdapter encoder = new SunJPEGEncoderAdapter();
        encoder.encode(bufferedImage, outputStream);
    } catch (FileNotFoundException e) {
        Logger.getLogger(this.getClass()).error(e);
    } catch (IOException e) {
        Logger.getLogger(this.getClass()).error(e);
    }
}