public abstract class AbstractResource extends Object implements Resource
org.springframework.core.io.AbstractResource| Constructor and Description |
|---|
AbstractResource() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists()
This implementation checks whether a File can be opened,
falling back to whether an InputStream can be opened.
|
File |
getFile()
Return a File handle for this resource.
|
URI |
getURI()
Return a URI handle for this resource.
|
URL |
getURL()
Return a URL handle for this resource.
|
long |
lastModified()
Determine the last-modified timestamp for this resource.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDescription, getInputStreampublic long lastModified()
throws IoRuntimeException
ResourcelastModified in interface ResourceIoRuntimeException - if the resource cannot be resolved
(in the file system or as some other known physical resource type)@Nonnull public URL getURL() throws IoRuntimeException
ResourcegetURL in interface ResourceIoRuntimeException - if the resource cannot be resolved as URL,
i.e. if the resource is not available as descriptor@Nonnull public File getFile() throws IoRuntimeException
ResourcegetFile in interface ResourceIoRuntimeException - if the resource cannot be resolved as absolute
file path, i.e. if the resource is not available in a file system@Nonnull public URI getURI() throws IoRuntimeException
ResourcegetURI in interface ResourceIoRuntimeException - if the resource cannot be resolved as URI,
i.e. if the resource is not available as descriptorpublic boolean exists()
Copyright © 2017. All Rights Reserved.