av.meta
Class FileSystemLoader
java.lang.Object
av.meta.FileSystemLoader
- All Implemented Interfaces:
- MetaLoader
public class FileSystemLoader
- extends Object
- implements MetaLoader
A MetaLoader implementation that loads resources from the
file system.
- Author:
- Compl
|
Method Summary |
InputStream |
getMetaResourceAsStream(String id)
This will replace dot(.) characters in id to the path
separator character of the host system of current JVM and then append the
file extension name, finally use the calculated string as a path name
under the specified dir at construction to try loading a
file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileSystemLoader
public FileSystemLoader(File dir)
- Construct a file system loader. The constructed loader will try to load
files under the specified
dir.
- Parameters:
dir - under which to find resource files
getMetaResourceAsStream
public InputStream getMetaResourceAsStream(String id)
- This will replace dot(.) characters in
id to the path
separator character of the host system of current JVM and then append the
file extension name, finally use the calculated string as a path name
under the specified dir at construction to try loading a
file.
- Specified by:
getMetaResourceAsStream in interface MetaLoader
- Parameters:
id - calculated as above
- Returns:
- the read stream for the resource exactly matches
id,
null otherwise.
Copyright© 2006 Ableverse Platform. All rights reserved.