public class ClassPathResource extends AbstractResource
| Constructor and Description |
|---|
ClassPathResource(ClassLoader classLoader,
String mimetype,
String path)
Creates a new ClassPathResource which uses the given ClassLoader to
read the resource having the given path.
|
ClassPathResource(String mimetype,
String path)
Creates a new ClassPathResource which uses the ClassLoader associated
with the ClassPathResource class to read the resource having the given
path.
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
asStream()
Returns an InputStream which reads the contents of this resource,
starting with the first byte.
|
getLastModified, getMimeTypepublic ClassPathResource(ClassLoader classLoader, String mimetype, String path)
classLoader - The ClassLoader to use when reading the resource.mimetype - The mimetype of the resource.path - The path of the resource relative to the given ClassLoader.public ClassPathResource(String mimetype, String path)
mimetype - The mimetype of the resource.path - The path of the resource relative to the ClassLoader associated
with the ClassPathResource class.public InputStream asStream()
ResourceCopyright © 2015. All rights reserved.