public class HttpResource extends Object implements Resource, Serializable
| 构造器和说明 |
|---|
HttpResource(Resource resource,
String contentType)
构造
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getContentType()
获取自定义Content-Type类型
|
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 InputStream getStream()
ResourceInputStreamgetStream 在接口中 ResourceInputStreampublic String getContentType()
Copyright © 2024. All rights reserved.