org.directwebremoting.impl
Class ImageIOFileGenerator

java.lang.Object
  extended by org.directwebremoting.impl.AbstractFileGenerator
      extended by org.directwebremoting.impl.ImageIOFileGenerator
All Implemented Interfaces:
FileGenerator

public class ImageIOFileGenerator
extends AbstractFileGenerator

A way to convert BufferedImages to files so they can be written using a FileServingServlet or similar.

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Constructor Summary
ImageIOFileGenerator(java.awt.image.BufferedImage image, java.lang.String mimeType, java.lang.String basename, java.lang.String type)
          Setup the image to convert
 
Method Summary
 void generateFile(java.io.OutputStream out)
          Write the file to the give OutputStream.
 
Methods inherited from class org.directwebremoting.impl.AbstractFileGenerator
getFilename, getMimeType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageIOFileGenerator

public ImageIOFileGenerator(java.awt.image.BufferedImage image,
                            java.lang.String mimeType,
                            java.lang.String basename,
                            java.lang.String type)
Setup the image to convert

Parameters:
image - the image to convert
mimeType - The mime type to convert the image into
type - ImageIO type
Method Detail

generateFile

public void generateFile(java.io.OutputStream out)
                  throws java.io.IOException
Description copied from interface: FileGenerator
Write the file to the give OutputStream. The system will take care of opening and closing the stream

Parameters:
out - The stream to write to.
Throws:
java.io.IOException - If there are creation problems

Copyright ¬ 2005