public class MapResourceFinder extends ResourceFinder
ResourceFinder that provides access to resource stored as byte arrays in
a Map.EMPTY_RESOURCE_FINDER| Constructor and Description |
|---|
MapResourceFinder() |
MapResourceFinder(Map<String,byte[]> map) |
| Modifier and Type | Method and Description |
|---|---|
void |
addResource(Resource resource) |
void |
addResource(String fileName,
byte[] data) |
void |
addResource(String fileName,
String data) |
Resource |
findResource(String resourceName)
Finds a resource by name and return it as a
Resource object. |
Collection<Resource> |
resources() |
void |
setLastModified(long lastModified) |
findResourceAsStreampublic void addResource(String fileName, byte[] data)
public void addResource(Resource resource)
public Collection<Resource> resources()
public final void setLastModified(long lastModified)
lastModified - The return value of Resource.lastModified() for the next resources added@Nullable public final Resource findResource(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 foundCopyright © 2019. All rights reserved.