public abstract class AbstractResource extends java.lang.Object implements Resource
| 构造器和说明 |
|---|
AbstractResource() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
exists()
This implementation checks whether a File can be opened,
falling back to whether an InputStream can be opened.
|
protected abstract java.io.File |
getFile2Check()
Determine the File to use for timestamp checking.
|
java.net.URI |
getURI()
builds a URI based on the URL returned by
Resource.getURL(). |
boolean |
isReadable() |
long |
lastModified()
checks the last modified time of the underlying File
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFile, getResourceLocation, getResourceName, getURLgetInputStream, getOutputStreampublic boolean exists()
public boolean isReadable()
isReadable 在接口中 Resourcepublic java.net.URI getURI()
throws java.io.IOException
Resource.getURL().public long lastModified()
throws java.io.IOException
lastModified 在接口中 Resourcejava.io.IOExceptionprotected abstract java.io.File getFile2Check()
throws java.io.IOException
null)java.io.IOException - if the resource cannot be resolved as absolute
file path, i.e. if the resource is not available in a file systempublic java.lang.String toString()
toString 在类中 java.lang.ObjectCopyright © 2024. All Rights Reserved.