|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dyuproject.ioc.AbstractResolver
com.dyuproject.ioc.FileResolver
public class FileResolver
A resolver that resolves a resource by from the filesystem.
Field Summary | |
---|---|
static FileResolver |
DEFAULT
|
static String |
TYPE
The type of this resolver. |
Fields inherited from class com.dyuproject.ioc.AbstractResolver |
---|
_bufferSize, _encoding, DEFAULT_BUFFER_SIZE, DEFAULT_ENCODING |
Constructor Summary | |
---|---|
FileResolver()
|
Method Summary | |
---|---|
Resource |
createResource(File file)
Creates a resource from a given file . |
Resource |
createResource(String path)
Creates a resource from a given path string. |
static FileResolver |
getDefault()
Gets the default instance. |
String |
getType()
Gets the type (id) of resolver |
void |
resolve(Resource resource,
Context context)
Resolves a resource by setting the Reader property of the Resource . |
Methods inherited from class com.dyuproject.ioc.AbstractResolver |
---|
generateTypeFromClass, getBufferSize, getEncoding, newReader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TYPE
public static final FileResolver DEFAULT
Constructor Detail |
---|
public FileResolver()
Method Detail |
---|
public static FileResolver getDefault()
public String getType()
Resource.Resolver
public void resolve(Resource resource, Context context) throws IOException
Resource.Resolver
Reader
property of the Resource
.
That is done via Resource.resolve(Reader)
.
IOException
public Resource createResource(String path) throws IOException
Resource.Resolver
IOException
public Resource createResource(File file) throws IOException
file
.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |