public class ResourceUtils extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
ResourceUtils.AggregateIterator<E> |
Modifier and Type | Field and Description |
---|---|
static char |
PATH_SEPARATOR_CHAR |
Constructor and Description |
---|
ResourceUtils() |
Modifier and Type | Method and Description |
---|---|
static URL |
getResource(String resourceName,
Class<?> callingClass) |
static InputStream |
getResourceAsStream(Class<?> callingClass,
String... filePaths)
按数组顺序查加载资源文件并返回输入流
|
static InputStream |
getResourceAsStream(String resourceName,
Class<?> callingClass) |
static Iterator<URL> |
getResources(String resourceName,
Class<?> callingClass,
boolean aggregate) |
public static final char PATH_SEPARATOR_CHAR
public static Iterator<URL> getResources(String resourceName, Class<?> callingClass, boolean aggregate) throws IOException
IOException
public static InputStream getResourceAsStream(String resourceName, Class<?> callingClass) throws IOException
IOException
public static InputStream getResourceAsStream(Class<?> callingClass, String... filePaths)
callingClass
- 调用都类型filePaths
- 资源文件列表Copyright © 2022. All rights reserved.