| org.springframework.core.io.Resource
All known Subclasses: org.springframework.core.io.AbstractResource,
Method Summary | |
Resource | createRelative(String relativePath) Create a resource relative to this resource. | boolean | exists() Return whether this resource actually exists in physical form. | String | getDescription() Return a description for this resource,
to be used for error output when working with the resource. | File | getFile() Return a File handle for this resource.
throws: IOException - if the resource cannot be resolved as absolutefile path, i.e. | String | getFilename() Return a filename for this resource, i.e. | URL | getURL() Return a URL handle for this resource.
throws: IOException - if the resource cannot be resolved as URL,i.e. | boolean | isOpen() Return whether this resource represents a handle with an open
stream. |
createRelative | Resource createRelative(String relativePath) throws IOException(Code) | | Create a resource relative to this resource.
Parameters: relativePath - the relative path (relative to this resource) the resource handle for the relative resource throws: IOException - if the relative resource cannot be determined |
exists | boolean exists()(Code) | | Return whether this resource actually exists in physical form.
|
getDescription | String getDescription()(Code) | | Return a description for this resource,
to be used for error output when working with the resource.
Implementations are also encouraged to return this value
from their toString method.
See Also: java.lang.Object.toString |
getFile | File getFile() throws IOException(Code) | | Return a File handle for this resource.
throws: IOException - if the resource cannot be resolved as absolutefile path, i.e. if the resource is not available in a file system |
getFilename | String getFilename()(Code) | | Return a filename for this resource, i.e. typically the last
part of the path: for example, "myfile.txt".
|
getURL | URL getURL() throws IOException(Code) | | Return a URL handle for this resource.
throws: IOException - if the resource cannot be resolved as URL,i.e. if the resource is not available as descriptor |
isOpen | boolean isOpen()(Code) | | Return whether this resource represents a handle with an open
stream. If true, the InputStream cannot be read multiple times,
and must be read and closed to avoid resource leaks.
Will be false for all usual resource descriptors.
|
|
|