public class UriResource extends Object implements Resource
| Modifier and Type | Field and Description |
|---|---|
protected String |
name |
protected URL |
url |
| Constructor and Description |
|---|
UriResource(URL url)
构造
|
UriResource(URL url,
String name)
构造
|
| Modifier and Type | Method and Description |
|---|---|
File |
getFile()
获得File
|
String |
getName()
获取资源名,例如文件资源的资源名为文件名
|
InputStream |
getStream()
获得
InputStream |
URL |
getUrl()
获得解析后的
URL |
String |
toString()
返回路径
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetReader, readBytes, readString, writeTopublic UriResource(URL url)
url - URLpublic InputStream getStream()
ResourceInputStreamgetStream in interface ResourceInputStreamCopyright © 2022. All rights reserved.