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 URL.
| Constructor Summary |
|---|
|
Create a new ClassPathResource for ClassLoader usage. |
|
Create a new ClassPathResource for ClassLoader usage. |
|
Create a new ClassPathResource for Class usage. |
|
Create a new ClassPathResource with optional ClassLoader and Class. |
| Method Summary | |
|---|---|
| Resource |
This implementation creates a ClassPathResource, applying the given path relative to the path of the underlying resource of this descriptor. |
| boolean |
This implementation compares the underlying class path locations. |
| String |
This implementation returns a description that includes the class path location. |
| File |
This implementation returns a File reference for the underlying class path resource, provided that it refers to a file in the file system. |
| String |
This implementation returns the name of the file that this class path resource refers to. |
| InputStream |
This implementation opens an InputStream for the given class path resource. |
| String |
Return the path for this resource. |
| URL |
This implementation returns a URL for the underlying class path resource. |
| int |
This implementation returns the hash code of the underlying class path location. |
| Methods inherited from org.springframework.core.ioAbstractResource |
|---|
| Methods inherited from java.langObject |
|---|
public
int
hashCode
(
)
The thread context class loader will be used for loading the resource.