org.zkoss.util.resource |
Resources
Resources and their locators and loaders.
|
Java Source File Name | Type | Comment |
AbstractLoader.java | Class | A skeletal implementation that assumes the source is either URL or File. |
ClassLocator.java | Class | The locator searches the current thread's context class loader,
and then this class's class loader. |
ContentLoader.java | Class | A
Loader that loads the resource by use URL.getContent()
if the source is URL, or loads into a String if the source is a File
(and assumging UTF-8). |
LabelLocator.java | Interface | A locater used to locate extra resource for
Labels . |
Labels.java | Class | Utilities to access labels. |
Loader.java | Interface | A loader that could load a resource to another format. |
Locator.java | Interface | A locator that is able to locate a resource. |
Locators.java | Class | Utilities to load and locate resources. |
PropertyBundle.java | Class | The property bundle.
It is similar to java.util.ResourceBundle, but they differ as follows.
- It uses
Maps.load(MapInputStream) to load the properties.
Thus, It is capable to handle UTF-16 and UTF-8 (but not ISO-8859-1).
- The locator could be any object as long as it implements
InputStream getResourceAsStream(String) .
- It supports only property files.
- The getBundle method returns null if the resource not found,
while ResourceBundle throws MissingResourceException.
Instances of PropertyBundle are cached, so the performance is good.
However, it implies the property file mapped by the giving
class loader, name and locale is immutable. |
ResourceCache.java | Class | Used to cache resouces. |