public class AliyunInputResource
extends org.springframework.core.io.AbstractResource
| 限定符 | 构造器和说明 |
|---|---|
protected |
AliyunInputResource()
反序列化时使用
|
|
AliyunInputResource(URL url)
阿里云盘资源访问类
|
| 限定符和类型 | 方法和说明 |
|---|---|
long |
contentLength()
获取资源的长度,来自响应头contentLength
|
boolean |
exists()
检测资源是否存在
|
HttpURLConnection |
getConnection()
获取一个阿里云盘资源已经打开的http连接
|
String |
getDescription() |
String |
getFilename()
获取这个url资源的文件名
|
org.springframework.http.HttpHeaders |
getHttpHeaders()
获取这个资源的响应头信息
|
org.springframework.http.HttpStatus |
getHttpStatus()
获取这个资源的状态码
|
InputStream |
getInputStream()
获取阿里云盘的资源
|
org.springframework.http.ResponseEntity<AliyunInputResource> |
getResponseEntity()
获取响应实体
|
long |
getTimeoutStampSeconds()
获取资源的过期时间戳
|
URL |
getURL() |
long |
lastModified() |
protected AliyunInputResource()
public AliyunInputResource(URL url) throws IOException
url - 资源路径IOException - 获取连接时出现的异常@NonNull public URL getURL()
getURL 在接口中 org.springframework.core.io.ResourcegetURL 在类中 org.springframework.core.io.AbstractResourcepublic long getTimeoutStampSeconds()
public org.springframework.http.HttpHeaders getHttpHeaders()
public org.springframework.http.HttpStatus getHttpStatus()
public final org.springframework.http.ResponseEntity<AliyunInputResource> getResponseEntity()
@NonNull public InputStream getInputStream() throws IOException
IOException - 表示发生了某种 I/O 异常。 此类是由失败或中断的 I/O 操作产生的异常的一般类。public long contentLength()
contentLength 在接口中 org.springframework.core.io.ResourcecontentLength 在类中 org.springframework.core.io.AbstractResource@NonNull public String getDescription()
public boolean exists()
exists 在接口中 org.springframework.core.io.Resourceexists 在类中 org.springframework.core.io.AbstractResourcepublic long lastModified()
lastModified 在接口中 org.springframework.core.io.ResourcelastModified 在类中 org.springframework.core.io.AbstractResource@Nullable public String getFilename()
getFilename 在接口中 org.springframework.core.io.ResourcegetFilename 在类中 org.springframework.core.io.AbstractResourcepublic HttpURLConnection getConnection() throws IOException
IOException - 连接时发生io异常Copyright © 2021. All rights reserved.