info.magnolia.imaging
Class DefaultImageStreamer<P>
java.lang.Object
info.magnolia.imaging.DefaultImageStreamer<P>
- Type Parameters:
P
- type of ParameterProvider's parameter
- All Implemented Interfaces:
- ImageStreamer<P>
public class DefaultImageStreamer<P>
- extends Object
- implements ImageStreamer<P>
An ImageStreamer implementation which always generates the image.
It also knows about some of the javax.imageio quirks, so other
implementations should consider subclassing or wrapping it.
- Version:
- $Id$
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultImageStreamer
public DefaultImageStreamer()
serveImage
public void serveImage(ImageGenerator<ParameterProvider<P>> generator,
ParameterProvider<P> params,
OutputStream out)
throws ImagingException,
IOException
- Description copied from interface:
ImageStreamer
- Generates an image (if deemed necessary) with the given ImageGenerator and Parameters, streams it to
the given OutputStream.
- Specified by:
serveImage
in interface ImageStreamer<P>
- Throws:
ImagingException
IOException
write
protected void write(BufferedImage img,
OutputStream out,
OutputFormat outputFormat)
throws IOException
- Throws:
IOException
Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.