public class ContentLoader extends AbstractLoader<java.lang.Object,java.lang.String>
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).Loader.Resource<V>| Constructor and Description |
|---|
ContentLoader() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
load(java.lang.Object src)
Loads the resource.
|
getLastModified, shallCheckpublic java.lang.String load(java.lang.Object src)
throws java.lang.Exception
LoaderThe 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)Copyright © 2005-2011 Potix Corporation. All Rights Reserved.