Package org.aoju.bus.core.io.resource
Class UriResource
java.lang.Object
org.aoju.bus.core.io.resource.UriResource
- All Implemented Interfaces:
Resource
- Direct Known Subclasses:
ClassPathResource
URL资源访问类
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescription构造UriResource(URI uri) 构造UriResource(URL url) 构造UriResource(URL url, String name) 构造 -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.aoju.bus.core.io.resource.Resource
getReader, readBytes, readString, writeTo
-
Field Details
-
url
-
name
-
-
Constructor Details
-
UriResource
public UriResource()构造 -
UriResource
-
UriResource
-
UriResource
-
-
Method Details
-
getName
-
getUrl
-
getStream
Description copied from interface:Resource获得InputStream- Specified by:
getStreamin interfaceResource- Returns:
InputStream
-
isModified
public boolean isModified()Description copied from interface:Resource检查资源是否变更 一般用于文件类资源,检查文件是否被修改过- Specified by:
isModifiedin interfaceResource- Returns:
- 是否变更
-
getFile
-
toString
-