|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface StreamMapper
An abstraction of the logic that chooses how to acquire a resource's InputStream by name and resource type
prefix. This only needs to be implemented by a user of this library if reading a registry in a different way than was
expected when it was written. For example, loading a registry via a product's installer to check if there are any
modifications to files would need to load all resources off the filesystem as opposed to what a running web
application would do, i.e. load some things off the classpath.
| Method Summary | |
|---|---|
java.lang.String |
getResourceKey(java.io.File file)
Given a file creates a resource key that would correspond to this file |
java.lang.String |
getResourcePath(java.lang.String resourceKey)
Given a resource name returns a file path to this resource. |
java.io.InputStream |
mapStream(java.lang.String prefix,
java.lang.String resourceName)
Gets the input stream for the resource registered with the given name and prefix. |
| Method Detail |
|---|
java.io.InputStream mapStream(java.lang.String prefix,
java.lang.String resourceName)
prefix - resourceName -
java.lang.String getResourcePath(java.lang.String resourceKey)
resourceKey -
java.lang.String getResourceKey(java.io.File file)
file -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||