public class InputStreamResource extends Object implements Resource, Serializable
InputStream的资源获取器| 构造器和说明 |
|---|
InputStreamResource(InputStream in)
构造
|
InputStreamResource(InputStream in,
String name)
构造
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getName()
获取资源名,例如文件资源的资源名为文件名
|
InputStream |
getStream()
获得
InputStream |
URL |
getUrl()
获得解析后的
URL,无对应URL的返回null |
long |
size()
获取资源大小
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetReader, isModified, readBytes, readStr, readUtf8Str, writeTopublic InputStreamResource(InputStream in)
in - InputStreampublic InputStreamResource(InputStream in, String name)
in - InputStreamname - 资源名称public InputStream getStream()
ResourceInputStreamgetStream 在接口中 ResourceInputStreamCopyright © 2024. All rights reserved.