The classes in this package really do little more than
getClass().getResourceAsStream ( <some resource name> )
.
However, using this package allows one set of classes to control where resources
are located and how they should be loaded - thus providing consistency.
Please note: This package does not preclude loading resource arbitrarily. Doing so requires managing resources, their location and distribution.
Useage
To retrieve a resource manager, do the following:
ResourceMgrIfc resourceMgr = ResourceMgr.getSingleton ();To retrieve a resource for resource
Foo.txt
, do the following:
InputStream fooIS = resourceMgr.getResource ( "Foo.txt" );Please note: If the resource is not found,
null
will be
returned.
@see org.jplate.util.resourcemgr.ResourceMgrIfc#RESOURCE_HOME