| java.lang.Object | |
| ↳ | org.springframework.core.io.AbstractResource |
Known Direct Subclasses
|
Known Indirect Subclasses
|
Convenience base class for Resource implementations,
pre-implementing typical behavior.
The "exists" method will check whether a File or InputStream can be opened; "isOpen" will always return false; "getURL" and "getFile" throw an exception; and "toString" will return the description.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
This implementation checks the timestamp of the underlying File,
if available.
| |||||||||||
This implementation throws a FileNotFoundException, assuming
that relative resources cannot be created for this resource.
| |||||||||||
This implementation compares description strings.
| |||||||||||
This implementation checks whether a File can be opened,
falling back to whether an InputStream can be opened.
| |||||||||||
This implementation throws a FileNotFoundException, assuming
that the resource cannot be resolved to an absolute file path.
| |||||||||||
This implementation always throws IllegalStateException,
assuming that the resource does not have a filename.
| |||||||||||
This implementation builds a URI based on the URL returned
by
getURL(). | |||||||||||
This implementation throws a FileNotFoundException, assuming
that the resource cannot be resolved to a URL.
| |||||||||||
This implementation returns the description's hash code.
| |||||||||||
This implementation always returns
false. | |||||||||||
This implementation always returns
true. | |||||||||||
This implementation checks the timestamp of the underlying File,
if available.
| |||||||||||
This implementation returns the description of this resource.
| |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Determine the File to use for timestamp checking.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.core.io.InputStreamSource
| |||||||||||
From interface
org.springframework.core.io.Resource
| |||||||||||
This implementation checks the timestamp of the underlying File, if available.
| IOException |
|---|
This implementation throws a FileNotFoundException, assuming that relative resources cannot be created for this resource.
| relativePath | the relative path (relative to this resource) |
|---|
| IOException |
|---|
This implementation checks whether a File can be opened, falling back to whether an InputStream can be opened. This will cover both directories and content resources.
This implementation throws a FileNotFoundException, assuming that the resource cannot be resolved to an absolute file path.
| IOException |
|---|
This implementation always throws IllegalStateException, assuming that the resource does not have a filename.
| IllegalStateException |
|---|
This implementation builds a URI based on the URL returned
by getURL().
| IOException |
|---|
This implementation throws a FileNotFoundException, assuming that the resource cannot be resolved to a URL.
| IOException |
|---|
This implementation returns the description's hash code.
This implementation checks the timestamp of the underlying File, if available.
| IOException |
|---|
Determine the File to use for timestamp checking.
The default implementation delegates to getFile().
null)| IOException | if the resource cannot be resolved as absolute file path, i.e. if the resource is not available in a file system |
|---|