public class URLResourceDescriptor extends AbstractResourceDescriptor
URL资源加载
| 构造器和说明 |
|---|
URLResourceDescriptor(String path) |
URLResourceDescriptor(URL url) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getDescription()
Return a description for this resource,
to be used for error output when working with the resource.
|
InputStream |
getInputStream()
获取输入流,该输入流支持多次读取
|
URL |
getURL()
返回
URL资源 |
exists, getFile, getFilename, getURI, length, toStringpublic URLResourceDescriptor(URL url)
public URLResourceDescriptor(String path) throws MalformedURLException
public InputStream getInputStream()
InputStreampublic URL getURL() throws IOException
URL资源getURL 在接口中 ResourceDescriptorgetURL 在类中 AbstractResourceDescriptorIOException - I/O异常public String getDescription()
Implementations are also encouraged to return this value
from their toString method.
Object.toString()Copyright © 2017. All rights reserved.