
public class FileSystemRegistry extends Object implements ResourceRegistry
ResourceRegistry that consults the file system for resources.| Constructor and Description |
|---|
FileSystemRegistry(File folder)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
URL |
getResource(String pathname)
Gets a resource
URL corresponding to the given pathname. |
InputStream |
getResourceAsStream(String pathname)
Gets an
InputStream to the resource at the given pathname. |
Enumeration<URL> |
getResources(String pathname)
Gets all resource
URLs corresponding to the given pathname. |
String |
toString()
Creates a human-readable representation of this registry.
|
public FileSystemRegistry(File folder)
public URL getResource(String pathname)
ResourceRegistryURL corresponding to the given pathname.getResource in interface ResourceRegistrypathname - the resource pathname.URL or null if not found.public Enumeration<URL> getResources(String pathname)
ResourceRegistryURLs corresponding to the given pathname.getResources in interface ResourceRegistrypathname - the resource pathname.Enumeration of resource URLs.public InputStream getResourceAsStream(String pathname)
ResourceRegistryInputStream to the resource at the given pathname.getResourceAsStream in interface ResourceRegistrypathname - the resource pathname.InputStream to the resource or null if not found.