Spring Framework

Interface ContextResource

All Superinterfaces:
InputStreamSource, Resource
All Known Implementing Classes:
PortletContextResource, ServletContextResource

public interface ContextResource
extends Resource

Extended interface for a resource that is loaded from an enclosing 'context', e.g. from a ServletContext or a PortletContext but also from plain classpath paths or relative file system paths (specified without an explicit prefix, hence applying relative to the local ResourceLoader's context).

Juergen Hoeller
See Also:
ServletContextResource, PortletContextResource

Method Summary
 java.lang.String getPathWithinContext()
          Return the path within the enclosing 'context'.
Methods inherited from interface org.springframework.core.io.Resource
contentLength, createRelative, exists, getDescription, getFile, getFilename, getInputStream, getURI, getURL, isOpen, isReadable, lastModified

Method Detail


java.lang.String getPathWithinContext()
Return the path within the enclosing 'context'.

This is typically path relative to a context-specific root directory, e.g. a ServletContext root or a PortletContext root.

Spring Framework