| java.lang.Object org.springframework.core.io.AbstractResource org.springframework.core.io.ClassPathResource
Method Summary | |
public Resource | createRelative(String relativePath) This implementation creates a ClassPathResource, applying the given path
relative to the path of the underlying resource of this descriptor. | public boolean | equals(Object obj) This implementation compares the underlying class path locations. | public String | getDescription() This implementation returns a description that includes the class path location. | public File | getFile() This implementation returns a File reference for the underlying class path
resource, provided that it refers to a file in the file system. | public String | getFilename() This implementation returns the name of the file that this class path
resource refers to. | public InputStream | getInputStream() This implementation opens an InputStream for the given class path resource. | final public String | getPath() Return the path for this resource. | public URL | getURL() This implementation returns a URL for the underlying class path resource. | public int | hashCode() This implementation returns the hash code of the underlying
class path location. |
ClassPathResource | public ClassPathResource(String path, ClassLoader classLoader)(Code) | | Create a new ClassPathResource for ClassLoader usage.
A leading slash will be removed, as the ClassLoader
resource access methods will not accept it.
Parameters: path - the absolute path within the classpath Parameters: classLoader - the class loader to load the resource with,or null for the thread context class loader See Also: java.lang.ClassLoader.getResourceAsStream(String) |
ClassPathResource | public ClassPathResource(String path, Class clazz)(Code) | | Create a new ClassPathResource for Class usage.
The path can be relative to the given class,
or absolute within the classpath via a leading slash.
Parameters: path - relative or absolute path within the class path Parameters: clazz - the class to load resources with See Also: java.lang.Class.getResourceAsStream |
ClassPathResource | protected ClassPathResource(String path, ClassLoader classLoader, Class clazz)(Code) | | Create a new ClassPathResource with optional ClassLoader and Class.
Only for internal usage.
Parameters: path - relative or absolute path within the classpath Parameters: classLoader - the class loader to load the resource with, if any Parameters: clazz - the class to load resources with, if any |
equals | public boolean equals(Object obj)(Code) | | This implementation compares the underlying class path locations.
|
getDescription | public String getDescription()(Code) | | This implementation returns a description that includes the class path location.
|
getPath | final public String getPath()(Code) | | Return the path for this resource.
|
hashCode | public int hashCode()(Code) | | This implementation returns the hash code of the underlying
class path location.
|
|
|