| com.uwyn.rife.resources.ResourceFinder
All known Subclasses: com.uwyn.rife.resources.AbstractResourceFinder, com.uwyn.rife.resources.DatabaseResources,
ResourceFinder | public interface ResourceFinder (Code) | | This interface defines the methods that classes with
ResourceFinder functionalities have to implement.
A ResourceFinder provides an abstract way of working
with resources. According to a name, a resource can be searched for and its
location is returned as an URL object.
It also possible to obtain a stream to read the resource's content,
to retrieve all its contents as a String and to obtain the
modification time of the resource.
author: Geert Bevin (gbevin[remove] at uwyn dot com) version: $Revision: 3634 $ See Also: com.uwyn.rife.resources.ResourceWriter since: 1.0 |
Method Summary | |
public String | getContent(String name) Retrieves the complete content of the resource that corresponds to the
provided name. | public String | getContent(String name, String encoding) Retrieves the complete content of the resource that corresponds to the
provided name. | public String | getContent(URL resource) Retrieves the complete content of the provided resource. | public String | getContent(URL resource, String encoding) Retrieves the complete content of the provided resource. | public long | getModificationTime(String name) Retrieves the modification time of the resource that corresponds to the
provided name. | public long | getModificationTime(URL resource) Retrieves the modification time of the provided resource. | public URL | getResource(String name) Retrieves the resource that corresponds to the provided name. | public ResultType | useStream(String name, InputStreamUser user) Returns a stream that can be used to read the contents of the resource
that corresponds to the provided name. | public ResultType | useStream(URL resource, InputStreamUser user) Returns a stream that can be used to read the contents of the provided
resource. |
getResource | public URL getResource(String name)(Code) | | Retrieves the resource that corresponds to the provided name.
This method never throws an exception, but returns null in
case of an exception.
Parameters: name - the name of the resource to retrieve the URL object that corresponds to the provided name; or null if the resource couldn't be found or if an erroroccurred. since: 1.0
|
|
|