protected static class DefaultResourceLoader.ClassPathContextResource extends ClassPathResource implements ContextResource
Constructor and Description |
---|
ClassPathContextResource(String path,
ClassLoader classLoader) |
Modifier and Type | Method and Description |
---|---|
Resource |
createRelative(String relativePath)
This implementation creates a ClassPathResource, applying the given path
relative to the path of the underlying resource of this descriptor.
|
String |
getPathWithinContext()
Return the path within the enclosing 'context'.
|
equals, exists, getClassLoader, getDescription, getFilename, getInputStream, getPath, getURL, hashCode, resolveURL
contentLength, customizeConnection, customizeConnection, getFile, getFile, getFileForLastModifiedCheck, isReadable, lastModified
getURI, isOpen, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
contentLength, exists, getDescription, getFile, getFilename, getURI, getURL, isOpen, isReadable, lastModified
getInputStream
public ClassPathContextResource(String path, ClassLoader classLoader)
public String getPathWithinContext()
ContextResource
This is typically path relative to a context-specific root directory, e.g. a ServletContext root or a PortletContext root.
getPathWithinContext
in interface ContextResource
public Resource createRelative(String relativePath)
ClassPathResource
createRelative
in interface Resource
createRelative
in class ClassPathResource
relativePath
- the relative path (relative to this resource)StringUtils.applyRelativePath(String, String)