com.bstek.dorado.core.io
| Constructor and Description |
|---|
DefaultResource(org.springframework.core.io.Resource adaptee) |
| Modifier and Type | Method and Description |
|---|---|
Resource |
createRelative(java.lang.String relativePath)
根据本资源的相对路径创建一个新的资源描述对象。
|
boolean |
equals(java.lang.Object obj) |
boolean |
exists()
返回该资源是否真实存在。
|
org.springframework.core.io.Resource |
getAdaptee() |
java.lang.String |
getDescription()
返回该资源的描述信息,该信息可用于发生异常时的错误信息输出。
该方法也将被用于toString()方法的内部实现。 |
java.io.File |
getFile()
返回该资源对应的文件对象。如果该资源不能映射到具体的文件将抛出IOException异常。
|
java.lang.String |
getFilename()
返回该资源的文件名。此处的文件名是不包含文件路径的,例如:"myfile.xml"。
|
java.io.InputStream |
getInputStream()
返回该资源的InputStream。
|
java.lang.String |
getPath()
返回原始的资源路径。
|
long |
getTimestamp()
返回该资源的时间戳。 类似于文件的最后修改时间,对于classpath等类型的资源可能无法取得真正的资源时间戳,在这种情况下将返回0。
|
java.net.URL |
getURL()
返回该资源的URL。如果该资源无法通过URL描述将抛出IOException异常。
|
int |
hashCode() |
java.lang.String |
toString() |
public DefaultResource(org.springframework.core.io.Resource adaptee)
public org.springframework.core.io.Resource getAdaptee()
public Resource createRelative(java.lang.String relativePath) throws java.io.IOException
ResourcecreateRelative in interface ResourcerelativePath - 相对于本资源的相对路径java.io.IOExceptionpublic java.lang.String getPath()
Resourcepublic boolean exists()
Resourcepublic java.lang.String getDescription()
ResourcegetDescription in interface ResourceObject.toString()public java.io.File getFile()
throws java.io.IOException
Resourcepublic java.lang.String getFilename()
ResourcegetFilename in interface Resourcepublic long getTimestamp()
throws java.io.IOException
ResourcegetTimestamp in interface Resourcejava.io.IOExceptionpublic java.io.InputStream getInputStream()
throws java.io.IOException
ResourcegetInputStream in interface Resourcejava.io.IOExceptionpublic java.net.URL getURL()
throws java.io.IOException
Resourcepublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2001-2011 www.BSTEK.com All Rights Reserved.