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