public class PluginResource extends Object implements org.springframework.core.io.Resource
插件资源实现类.主要是对Spring中的抽象的Resource实现. 功能: 主要是获取插件包中的文件资源。
| 构造器和说明 |
|---|
PluginResource(String path,
BasePlugin basePlugin)
相对Classpath 路径
|
| 限定符和类型 | 方法和说明 |
|---|---|
long |
contentLength() |
org.springframework.core.io.Resource |
createRelative(String relativePath) |
boolean |
exists() |
String |
getDescription() |
File |
getFile() |
String |
getFilename() |
InputStream |
getInputStream() |
URI |
getURI() |
URL |
getURL() |
boolean |
isOpen() |
boolean |
isReadable() |
long |
lastModified() |
public PluginResource(String path, BasePlugin basePlugin)
path - 路径basePlugin - basePlugin beanpublic InputStream getInputStream()
getInputStream 在接口中 org.springframework.core.io.InputStreamSourcepublic long contentLength()
throws IOException
contentLength 在接口中 org.springframework.core.io.ResourceIOExceptionpublic long lastModified()
lastModified 在接口中 org.springframework.core.io.Resourcepublic org.springframework.core.io.Resource createRelative(String relativePath)
createRelative 在接口中 org.springframework.core.io.Resourcepublic String getFilename()
getFilename 在接口中 org.springframework.core.io.Resourcepublic String getDescription()
getDescription 在接口中 org.springframework.core.io.Resourcepublic boolean exists()
exists 在接口中 org.springframework.core.io.Resourcepublic boolean isReadable()
isReadable 在接口中 org.springframework.core.io.Resourcepublic boolean isOpen()
isOpen 在接口中 org.springframework.core.io.Resourcepublic File getFile() throws IOException
getFile 在接口中 org.springframework.core.io.ResourceIOExceptionpublic URL getURL()
getURL 在接口中 org.springframework.core.io.Resourcepublic URI getURI()
getURI 在接口中 org.springframework.core.io.ResourceCopyright © 2020. All rights reserved.