org.directwebremoting.impl
Class InputStreamFileGenerator

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

public class InputStreamFileGenerator
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
InputStreamFileGenerator(java.io.InputStream in, java.lang.String filename, java.lang.String mimeType)
          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

InputStreamFileGenerator

public InputStreamFileGenerator(java.io.InputStream in,
                                java.lang.String filename,
                                java.lang.String mimeType)
Setup the image to convert

Parameters:
in - the data to stream
mimeType - The mime type to convert the image into
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