org.directwebremoting.impl
Class AbstractFileGenerator
java.lang.Object
org.directwebremoting.impl.AbstractFileGenerator
- All Implemented Interfaces:
- FileGenerator
- Direct Known Subclasses:
- ImageIOFileGenerator, InputStreamFileGenerator
public abstract class AbstractFileGenerator
- extends java.lang.Object
- implements FileGenerator
A helper to aid implementing FileGenerator that takes care of the
filename and mimeType fields
- Author:
- Joe Walker [joe at getahead dot ltd dot uk]
|
Constructor Summary |
AbstractFileGenerator(java.lang.String filename,
java.lang.String mimeType)
Setup the filename and mimeType |
|
Method Summary |
java.lang.String |
getFilename()
Accessor for the filename of this download |
java.lang.String |
getMimeType()
What is the MimeType for the given file |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractFileGenerator
public AbstractFileGenerator(java.lang.String filename,
java.lang.String mimeType)
- Setup the filename and mimeType
getFilename
public java.lang.String getFilename()
- Description copied from interface:
FileGenerator
- Accessor for the filename of this download
- Specified by:
getFilename in interface FileGenerator
- Returns:
- An appropriate filename which may have to be some sort of default
getMimeType
public java.lang.String getMimeType()
- Description copied from interface:
FileGenerator
- What is the MimeType for the given file
- Specified by:
getMimeType in interface FileGenerator
- Returns:
- a valid mime-type