public abstract class AbstractResource extends java.lang.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.
|
java.io.File |
getFile()
Return a File handle for this resource.
|
java.net.URI |
getURI()
Return a URI handle for this resource.
|
java.net.URL |
getURL()
Return a URL handle for this resource.
|
long |
lastModified()
Determine the last-modified timestamp for this resource.
|
java.lang.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 java.net.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 java.io.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 java.net.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()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2019. All Rights Reserved.