public class FileSystemResourceLoader extends BufferedResourceLoader
ResourceLoader
DEFAULT_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, setCharacterSet
close, getKey
public FileSystemResourceLoader(File rootDir)
public FileSystemResourceLoader(String rootDir)
public Reader open(String name) throws IOException
ResourceLoader
ResourceLoader.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
ResourceLoader
ResourceLoader.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 ResourceLoader
getResourceVersionId
in class BaseResourceLoader
filename
- the name of the resource to check for resourcesCopyright © 2010–2013 Google. All rights reserved.