public abstract class ResourceLoader extends Object implements Loader
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ResourceLoader.ResourceEnumerator |
| Constructor and Description |
|---|
ResourceLoader() |
| Modifier and Type | Method and Description |
|---|---|
Enumeration<Resource> |
load(String path)
加载指定路径的所有资源,等效于Loader.load(path, false, Filters.ALWAYS)的调用。
通常情况下不递归加载,但是子类可以改变此方法的行为,
例如ANT风格路径的资源加载器可以根据传入表达式来判断是否递归加载。
|
Enumeration<Resource> |
load(String path,
boolean recursively)
加载指定路径的所有资源,等效于Loader.load(path, recursively, Filters.ALWAYS)的调用。
|
Enumeration<Resource> |
load(String path,
Filter filter)
加载指定路径的所有满足过滤条件的资源,等效于Loader.load(path, true, boot)的调用。
|
public Enumeration<Resource> load(String path) throws IOException
Loaderload in interface Loaderpath - 资源路径IOException - I/O 异常public Enumeration<Resource> load(String path, boolean recursively) throws IOException
Loaderload in interface Loaderpath - 资源路径recursively - 递归加载IOException - I/O 异常public Enumeration<Resource> load(String path, Filter filter) throws IOException
Loaderload in interface Loaderpath - 资源路径filter - 过滤器IOException - I/O 异常Copyright © 2019. All rights reserved.