public class MapResourceFinder extends ResourceFinder
ResourceFinder that provides access
to resource stored as byte arrays in a Map.| Modifier and Type | Field and Description |
|---|---|
private long |
lastModified |
private java.util.Map<java.lang.String,byte[]> |
map |
EMPTY_RESOURCE_FINDER| Constructor and Description |
|---|
MapResourceFinder(java.util.Map<java.lang.String,byte[]> map) |
| Modifier and Type | Method and Description |
|---|---|
Resource |
findResource(java.lang.String resourceName)
Find a resource by name and return it as a
Resource object. |
void |
setLastModified(long lastModified) |
findResourceAsStreamprivate final java.util.Map<java.lang.String,byte[]> map
private long lastModified
public MapResourceFinder(java.util.Map<java.lang.String,byte[]> map)
public final void setLastModified(long lastModified)
lastModified - The return value of Resource.lastModified() for the next resources foundpublic final Resource findResource(java.lang.String resourceName)
ResourceFinderResource object.findResource in class ResourceFinderresourceName - Designates the resource; typically structured by slashes ("/") like
"com/foo/pkg/Bar.class"null if the resource could not be found