public abstract class ResourceUtils extends Object
Utilities for manipulating resource paths and URLs.
Modifiers | Name | Description |
---|---|---|
static String |
ALL_CLASSPATH_URL_PREFIX |
Pseudo URL prefix for loading all resources from the class path: "classpath*:". |
static String |
CLASSPATH_URL_PREFIX |
Pseudo URL prefix for loading from the class path: "classpath:". |
static String |
FILE_URL_PREFIX |
URL prefix for loading from the file system: "file:". |
Type Params | Return Type | Name and description |
---|---|---|
|
public static List<String> |
getUrls(String path, ClassLoader classLoader) Return URLs from a given source path. |
Pseudo URL prefix for loading all resources from the class path: "classpath*:".
Pseudo URL prefix for loading from the class path: "classpath:".
URL prefix for loading from the file system: "file:".
Return URLs from a given source path. Source paths can be simple file locations (/some/file.java) or wildcard patterns (/some/**). Additionally the prefixes "file:", "classpath:" and "classpath*:" can be used for specific path types.
path
- the source pathclassLoader
- the class loader or null
to use the default