public class InputStreamResource extends Object implements Resource, Serializable
InputStream
的资源获取器Constructor and Description |
---|
InputStreamResource(InputStream in)
构造
|
InputStreamResource(InputStream in,
String name)
构造
|
Modifier and Type | Method and Description |
---|---|
String |
getName()
获取资源名,例如文件资源的资源名为文件名
|
InputStream |
getStream()
获得
InputStream |
URL |
getUrl()
获得解析后的
URL ,无对应URL的返回null |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getReader, isModified, readBytes, readStr, readUtf8Str, writeTo
public InputStreamResource(InputStream in)
in
- InputStream
public InputStreamResource(InputStream in, String name)
in
- InputStream
name
- 资源名称public InputStream getStream()
Resource
InputStream
getStream
in interface Resource
InputStream
Copyright © 2024. All rights reserved.