|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.modzdetector.FilesystemStreamMapper
public class FilesystemStreamMapper
Implements a mapping for streams that are only ever loaded from a filesystem rooted at a specific configured directory.
// TODO can has remove filter?
| Constructor Summary | |
|---|---|
FilesystemStreamMapper(java.io.File base,
java.io.FileFilter filter)
Constructor that provides the base directory. |
|
| 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FilesystemStreamMapper(java.io.File base,
java.io.FileFilter filter)
base - the base of the filesystem mapping.filter - a filter to restrict what resources are visible.| Method Detail |
|---|
public java.io.InputStream mapStream(java.lang.String prefix,
java.lang.String resourceName)
StreamMapper
mapStream in interface StreamMapperpublic java.lang.String getResourcePath(java.lang.String resourceKey)
StreamMapper
getResourcePath in interface StreamMapperpublic java.lang.String getResourceKey(java.io.File file)
StreamMapper
getResourceKey in interface StreamMapper
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||