public class InMemoryResourceLoader extends BaseResourceLoader
store(String, String)
method.ResourceLoader
Constructor and Description |
---|
InMemoryResourceLoader() |
Modifier and Type | Method and Description |
---|---|
ConcurrentMap<String,String> |
getItems() |
Reader |
open(String name)
Open a resource.
|
Reader |
openOrFail(String name)
Open a resource or throw an exception if no such resource is found.
|
void |
remove(String name) |
void |
store(String name,
String contents) |
close, getKey, getResourceVersionId
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 void remove(String name)
public ConcurrentMap<String,String> getItems()
Copyright © 2010-2013 Google. All Rights Reserved.