public class PathResourceLoader extends AbstractResourceLoader
ResourceLoader.InputStreamGet, ResourceLoader.MatchType, ResourceLoader.ScanEvent, ResourceLoader.Scanner<T>parentClassLoader| 构造器和说明 |
|---|
PathResourceLoader() |
PathResourceLoader(ClassLoader parent) |
PathResourceLoader(ClassLoader parent,
File dirFile) |
PathResourceLoader(File dirFile) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addPath(File dirFile) |
boolean |
exist(String resource) |
URL |
getResource(String resource) |
InputStream |
getResourceAsStream(String resource) |
List<URL> |
getResources(String resource) |
List<InputStream> |
getResourcesAsStream(String resource) |
<T> T |
scanOneResource(ResourceLoader.MatchType matchType,
ResourceLoader.Scanner<T> scanner,
String[] scanPaths) |
<T> List<T> |
scanResources(ResourceLoader.MatchType matchType,
ResourceLoader.Scanner<T> scanner,
String[] scanPaths) |
protected boolean |
testFound(File entry,
Predicate<File>[] testPredicates) |
buildPredicate, getClass, loaderForClassLoaderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitscanOneResource, scanOneResource, scanResources, scanResourcespublic PathResourceLoader()
public PathResourceLoader(File dirFile)
public PathResourceLoader(ClassLoader parent)
public PathResourceLoader(ClassLoader parent, File dirFile)
public void addPath(File dirFile)
public URL getResource(String resource) throws IOException
IOExceptionpublic InputStream getResourceAsStream(String resource) throws IOException
IOExceptionpublic List<URL> getResources(String resource) throws IOException
IOExceptionpublic List<InputStream> getResourcesAsStream(String resource) throws IOException
IOExceptionpublic boolean exist(String resource)
public <T> List<T> scanResources(ResourceLoader.MatchType matchType, ResourceLoader.Scanner<T> scanner, String[] scanPaths) throws IOException
IOExceptionpublic <T> T scanOneResource(ResourceLoader.MatchType matchType, ResourceLoader.Scanner<T> scanner, String[] scanPaths) throws IOException
IOExceptionCopyright © 2022. All rights reserved.