|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.util.resource.AbstractLoader<java.lang.Object,java.lang.String> org.zkoss.util.resource.ContentLoader
public class ContentLoader
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 assuming UTF-8).
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.zkoss.util.resource.Loader |
---|
Loader.Resource<V> |
Constructor Summary | |
---|---|
ContentLoader()
|
Method Summary | |
---|---|
java.lang.String |
load(java.lang.Object src)
Loads the resource. |
Methods inherited from class org.zkoss.util.resource.AbstractLoader |
---|
getLastModified, shallCheck |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContentLoader()
Method Detail |
---|
public java.lang.String load(java.lang.Object src) throws java.lang.Exception
Loader
The returned resource could be anything. It will be returned
by ResourceCache.get(java.lang.Object)
.
However, if you want to have more control (e.g., whether to cache),
you can return an instance
of Loader.Resource
. Then, the return value of ResourceCache.get(java.lang.Object)
will be Loader.Resource.resource
.
java.lang.Exception
- you might throw any exception which will be
passed back to the caller of ResourceCache.get(java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |