public interface ContentResourceLoader
Modifier and Type | Method and Description |
---|---|
URL |
getResource(String path)
Returns a URL to the resource that is mapped to the given path.
|
InputStream |
getResourceAsStream(String path)
Returns the resource located at the named path as
an
InputStream object. |
URL getResource(String path) throws MalformedURLException
The path must begin with a / and is interpreted as relative to the current content root.
This method returns null
if no resource is mapped to the pathname.
path
- a String
specifying
the path to the resourcenull
if there is no resource at that pathMalformedURLException
- if the pathname is not given in
the correct formInputStream getResourceAsStream(String path) throws IOException
InputStream
object.
The path must be specified according
to the rules given in getResource
.
This method returns null
if no resource exists at
the specified path.
path
- a String
specifying the path
to the resourceInputStream
returned to the
caller, or null
if no resource
exists at the specified pathIOException
Copyright © 2007–2017 Hippo B.V. (http://www.onehippo.com). All rights reserved.