|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectconsciouscode.util.resource.FileResourceTree
public class FileResourceTree
A ResourceTree that reads resources directly from the file system.
| Constructor Summary | |
|---|---|
FileResourceTree(File baseDirectory)
Creates a new resource tree that exposes resources stored as a file system hierarchy within a base directory. |
|
FileResourceTree(File baseDirectory,
ResourceTreeProvider provider)
Creates a new resource tree that exposes resources stored as a file system hierarchy within a base directory. |
|
FileResourceTree(File baseDirectory,
ResourceTreeProvider provider,
boolean allowMissingBase)
Creates a new resource tree that exposes resources stored as a file system hierarchy within a base directory. |
|
| Method Summary | |
|---|---|
File |
getBaseDirectory()
Gets the base directory that houses all of the resources of this tree. |
Resource |
getResource(String path)
Returns information about a resource file. |
ResourceTreeProvider |
getResourceTreeProvider()
Gets the provider of this resource tree. |
URL |
getResourceUrl(String path)
Returns a URL to a resource file. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileResourceTree(File baseDirectory)
baseDirectory - must be a readable directory,
not null.
public FileResourceTree(File baseDirectory,
ResourceTreeProvider provider)
baseDirectory - must be a readable directory,
not null.
public FileResourceTree(File baseDirectory,
ResourceTreeProvider provider,
boolean allowMissingBase)
baseDirectory - must not null.provider - may be null.allowMissingBase - indicates whether this method will check for
existence and readability of the baseDirectory.| Method Detail |
|---|
public File getBaseDirectory()
null.public Resource getResource(String path)
ResourceTree
getResource in interface ResourceTreepath - identifies the desired resource.
null if no resource exists at the given path.public URL getResourceUrl(String path)
getResourceUrl in interface ResourceTreepath - can be either absolute or relative, but it is
always resolved relative to this layer's
baseDirectory. It must not be null.
null if no resource exists at the given path.public ResourceTreeProvider getResourceTreeProvider()
ResourceTree
getResourceTreeProvider in interface ResourceTreenull.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||