public class ResourceUtils
extends java.lang.Object
Resource
构造器和说明 |
---|
ResourceUtils() |
限定符和类型 | 方法和说明 |
---|---|
static java.io.InputStream |
getResourceAsStream(java.lang.Object object,
Resource resource)
Get the InputStream for this resource.
|
static java.net.URL |
getResourceAsURL(java.lang.Object object,
Resource resource)
Get the URL for this resource.
|
public static java.io.InputStream getResourceAsStream(java.lang.Object object, Resource resource)
object
- The object to grab the Classloader from.
This parameter is quite important from a
visibility of resources standpoint as the
hierarchy of Classloaders plays a role.resource
- The resource to load.Resource
,
getResourceAsURL(Object, Resource)
,
InputStream
public static java.net.URL getResourceAsURL(java.lang.Object object, Resource resource)
object
- The object to grab the Classloader from.
This parameter is quite important from a
visibility of resources standpoint as the
hierarchy of Classloaders plays a role.resource
- The resource to load.Resource
,
getResourceAsStream(Object, Resource)