org.directwebremoting.impl
Class ImageIOFileGenerator
java.lang.Object
org.directwebremoting.impl.AbstractFileGenerator
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 java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 convertmimeType - The mime type to convert the image intotype - ImageIO type
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