public abstract class ResourceUtils
extends java.lang.Object
| Constructor and Description |
|---|
ResourceUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
decode(java.lang.String source)
Decodes the given encoded source String into an URI.
|
static org.springframework.core.io.Resource |
findContainingJar(java.lang.Class<?> clazz)
Locates the jar (within the classpath) containing the given class.
|
static org.springframework.core.io.Resource |
findContainingJar(java.lang.ClassLoader loader,
java.lang.String resourceName)
Locates a jar (within the classpath) containing the given resource.
|
public static org.springframework.core.io.Resource findContainingJar(java.lang.Class<?> clazz)
findContainingJar(ClassLoader, String)
instead.clazz - the class to look forpublic static org.springframework.core.io.Resource findContainingJar(java.lang.ClassLoader loader,
java.lang.String resourceName)
loader - class loader to use for locating the jarresourceName - resource to look forpublic static java.lang.String decode(java.lang.String source)
"a" through "z",
"A" through "Z", and "0" through "9"
stay the same.
"-", "_", ".", and
"*" stay the same.
%xy format.
%xy" is interpreted as a hexadecimal
representation of the character.
source - the source stringURLDecoder.decode(String, String)