Package org.aoju.bus.core.io.resource
Class InputStreamResource
java.lang.Object
org.aoju.bus.core.io.resource.InputStreamResource
- All Implemented Interfaces:
Resource
基于
InputStream的资源获取器
注意:此对象中getUrl方法始终返回null- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()获取资源名,例如文件资源的资源名为文件名获得InputStreamgetUrl()获得解析后的URLMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aoju.bus.core.io.resource.Resource
getReader, isModified, readBytes, readString, writeTo
-
Constructor Details
-
InputStreamResource
构造- Parameters:
in-InputStream
-
InputStreamResource
构造- Parameters:
in-InputStreamname- 资源名称
-
-
Method Details
-
getName
Description copied from interface:Resource获取资源名,例如文件资源的资源名为文件名 -
getUrl
Description copied from interface:Resource获得解析后的URL -
getStream
Description copied from interface:Resource获得InputStream- Specified by:
getStreamin interfaceResource- Returns:
InputStream
-