org.wings.template
Class CachedFileTemplateSource
java.lang.Object
org.wings.template.FileTemplateSource
org.wings.template.CachedFileTemplateSource
- All Implemented Interfaces:
- Serializable, TemplateSource
public class CachedFileTemplateSource
- extends FileTemplateSource
A CachedFileDataSource implements a DataSource
for a file, but caches small ones.
- Author:
- Henner Zeller
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CachedFileTemplateSource
public CachedFileTemplateSource(File f)
throws IOException
- Throws:
IOException
CachedFileTemplateSource
public CachedFileTemplateSource(URL url)
throws IOException
- Throws:
IOException
lastModified
public long lastModified()
- Returns the time the content of this File
was last modified.
The return value is used to decide whether to reparse a
Source or not. Reparsing is done if the value returned
here differs from the value returned at the last processing
time.
- Specified by:
lastModified in interface TemplateSource- Overrides:
lastModified in class FileTemplateSource
- Returns:
- long a modification time
getInputStream
public InputStream getInputStream()
throws IOException
- Gets an InputStream of the File.
- Specified by:
getInputStream in interface TemplateSource- Overrides:
getInputStream in class FileTemplateSource
- Returns:
- an InputStream the content of the template is read from.
- Throws:
IOException
wingS Swings ;-)