org.jCharts.encoders
Class JPEGEncoder

java.lang.Object
  extended by org.jCharts.encoders.JPEGEncoder

public final class JPEGEncoder
extends Object

This class REQUIRES the jdk 1.4


Field Summary
private static String JPEG
           
 
Constructor Summary
private JPEGEncoder()
           
 
Method Summary
static void encode(Chart chart, float quality, OutputStream outputStream)
          Encodes the chart to a JPEG format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JPEG

private static final String JPEG
See Also:
Constant Field Values
Constructor Detail

JPEGEncoder

private JPEGEncoder()
             throws Exception
Throws:
Exception
Method Detail

encode

public static final void encode(Chart chart,
                                float quality,
                                OutputStream outputStream)
                         throws ChartDataException,
                                PropertyException,
                                IOException
Encodes the chart to a JPEG format. If you are generating large dimension images, the file size can get quite large. You can try decreasing the quality to decrease the file size.

Parameters:
outputStream -
quality - float value from 0.0f(worst image quality) - 1.0f(best image quality)
Throws:
ChartDataException
PropertyException
IOException