public class FileSystemResourceLoader extends BufferedResourceLoader
ResourceLoaderDEFAULT_BUFFER_SIZE, DEFAULT_CHARACTER_SET| Constructor and Description |
|---|
FileSystemResourceLoader(File rootDir) |
FileSystemResourceLoader(String rootDir) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getResourceVersionId(String filename)
Some applications, e.g.
|
Reader |
open(String name)
Open a resource.
|
Reader |
openOrFail(String name)
Open a resource or throw an exception if no such resource is found.
|
buffer, getBufferSize, getCharacterSet, setBufferSize, setCharacterSetclose, getKeypublic FileSystemResourceLoader(File rootDir)
public FileSystemResourceLoader(String rootDir)
public Reader open(String name) throws IOException
ResourceLoaderResourceLoader.close(Reader) when done with the
reader.name - the name of the resourceIOException - if resource fails to openpublic Reader openOrFail(String name) throws JSilverTemplateNotFoundException, IOException
ResourceLoaderResourceLoader.close(Reader) when done with the
reader.name - the name of the resourceJSilverTemplateNotFoundException - if resource is not foundIOException - if resource fails to openpublic Object getResourceVersionId(String filename)
File.getCanonicalFile(), if possible.getResourceVersionId in interface ResourceLoadergetResourceVersionId in class BaseResourceLoaderfilename - the name of the resource to check for resourcesCopyright © 2010–2013 Google. All rights reserved.