org.apache.batik.svggen

Class CachedImageHandlerJPEGEncoder

public class CachedImageHandlerJPEGEncoder extends DefaultCachedImageHandler

GenericImageHandler which caches JPEG images.
Field Summary
static StringCACHED_JPEG_PREFIX
static StringCACHED_JPEG_SUFFIX
protected StringrefPrefix
Constructor Summary
CachedImageHandlerJPEGEncoder(String imageDir, String urlRoot)
Method Summary
voidencodeImage(BufferedImage buf, OutputStream os)
Uses JPEG encoding.
intgetBufferedImageType()
StringgetRefPrefix()

Field Detail

CACHED_JPEG_PREFIX

public static final String CACHED_JPEG_PREFIX

CACHED_JPEG_SUFFIX

public static final String CACHED_JPEG_SUFFIX

refPrefix

protected String refPrefix

Constructor Detail

CachedImageHandlerJPEGEncoder

public CachedImageHandlerJPEGEncoder(String imageDir, String urlRoot)

Parameters: imageDir directory where this handler should generate images. If null, an IllegalArgumentException is thrown. urlRoot root for the urls that point to images created by this image handler. If null, then the url corresponding to imageDir is used.

Method Detail

encodeImage

public void encodeImage(BufferedImage buf, OutputStream os)
Uses JPEG encoding.

getBufferedImageType

public int getBufferedImageType()

getRefPrefix

public String getRefPrefix()
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.