Class ClassPathResource

All Implemented Interfaces:
InputStreamSource, Resource
Direct Known Subclasses:
DefaultResourceLoader.ClassPathContextResource

public class ClassPathResource extends AbstractFileResolvingResource
Resource implementation for class path resources. Uses either a given ClassLoader or a given Class for loading resources.

Supports resolution as java.io.File if the class path resource resides in the file system, but not for resources in a JAR. Always supports resolution as java.net.URL.

Since:
28.12.2003
Author:
Juergen Hoeller, Sam Brannen
See Also: