public abstract class AbstractResourceDescriptor extends Object implements ResourceDescriptor
| 构造器和说明 |
|---|
AbstractResourceDescriptor() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
exists()
判断资源是否存在
|
File |
getFile()
返回文件对象,如果对象不存在则返回
null |
String |
getFilename()
返回文件名,如果资源不存在,则返回
null |
URI |
getURI()
返回
URI资源 |
URL |
getURL()
返回
URL资源 |
long |
length()
返回资源的内容长度,如果资源不存在则返回
-1 |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDescription, getInputStreampublic boolean exists()
exists 在接口中 ResourceDescriptortrue,否则返回falsepublic URL getURL() throws IOException
URL资源getURL 在接口中 ResourceDescriptorIOException - I/O异常public URI getURI() throws IOException
URI资源getURI 在接口中 ResourceDescriptorIOException - I/O异常public File getFile() throws IOException
nullgetFile 在接口中 ResourceDescriptorIOException - IO异常public long length()
-1length 在接口中 ResourceDescriptorpublic String getFilename()
nullgetFilename 在接口中 ResourceDescriptorCopyright © 2017. All rights reserved.