org.directwebremoting.extend
Interface FileGenerator

All Known Implementing Classes:
AbstractFileGenerator, FileTransferFileGenerator, ImageIOFileGenerator, InputStreamFileGenerator

public interface FileGenerator

A representation of the file that we are writing out.

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

Method Summary
 void generateFile(java.io.OutputStream out)
          Write the file to the give OutputStream.
 java.lang.String getFilename()
          Accessor for the filename of this download
 java.lang.String getMimeType()
          What is the MimeType for the given file
 

Method Detail

generateFile

void generateFile(java.io.OutputStream out)
                  throws java.io.IOException
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

getMimeType

java.lang.String getMimeType()
What is the MimeType for the given file

Returns:
a valid mime-type

getFilename

java.lang.String getFilename()
Accessor for the filename of this download

Returns:
An appropriate filename which may have to be some sort of default

Copyright ¬ 2005