NIMSDK-AOS
10.5.0
basesdk
src
com
netease
nimlib
sdk
nos
model
NosTransferInfo.java
浏览该文件的文档.
1
package
com.netease.nimlib.sdk.nos.model;
2
3
import
com
.
netease
.
nimlib
.
sdk
.
nos
.
constant
.
NosTransferStatus
;
4
5
import
java.io.Serializable;
6
10
public
class
NosTransferInfo
implements
Serializable {
11
12
public
enum
TransferType
{
13
UPLOAD
,
14
DOWNLOAD
15
}
16
20
protected
TransferType
transferType
;
21
25
protected
String
path
;
26
30
protected
long
size
;
31
35
protected
String
md5
;
36
40
protected
String
url
;
41
45
protected
String
extension
;
46
50
protected
NosTransferStatus
status
=
NosTransferStatus
.
def
;
51
57
public
String
getPath
() {
58
return
path
;
59
}
60
66
public
void
setPath
(String path) {
67
this.path =
path
;
68
}
69
75
public
long
getSize
() {
76
return
size
;
77
}
78
84
public
void
setSize
(
long
size) {
85
this.size =
size
;
86
}
87
93
public
String
getMd5
() {
94
return
md5
;
95
}
96
102
public
void
setMd5
(String md5) {
103
this.md5 =
md5
;
104
}
105
111
public
String
getUrl
() {
112
return
url
;
113
}
114
118
public
void
setUrl
(String url) {
119
this.url =
url
;
120
}
121
127
public
String
getExtension
() {
128
return
extension
;
129
}
130
136
public
void
setExtension
(String extension) {
137
this.extension =
extension
;
138
}
139
145
public
NosTransferStatus
getStatus
() {
146
return
status
;
147
}
148
154
public
void
setStatus
(
NosTransferStatus
status) {
155
this.status =
status
;
156
}
157
163
public
TransferType
getTransferType
() {
164
return
transferType
;
165
}
166
172
public
void
setTransferType
(
TransferType
transferType) {
173
this.transferType =
transferType
;
174
}
175
181
public
String
getKey
() {
182
if
(transferType ==
TransferType
.
UPLOAD
) {
183
return
getPath
();
184
}
else
{
185
return
getUrl
();
186
}
187
}
188
}
com.netease.nimlib.sdk.nos.model.NosTransferInfo.TransferType
Definition:
NosTransferInfo.java:12
com.netease.nimlib.sdk.nos.model.NosTransferInfo.setUrl
void setUrl(String url)
Definition:
NosTransferInfo.java:118
com.netease.nimlib.sdk.nos.model.NosTransferInfo
NOS文件传输信息
Definition:
NosTransferInfo.java:10
com.netease.nimlib.sdk.nos.model.NosTransferInfo.getExtension
String getExtension()
获取文件后缀名
Definition:
NosTransferInfo.java:127
com.netease.nimlib.sdk.nos.model.NosTransferInfo.md5
String md5
文件内容的MD5
Definition:
NosTransferInfo.java:35
com.netease.nimlib.sdk.nos.model.NosTransferInfo.getUrl
String getUrl()
获取文件在服务器上的下载url。若文件还未上传,返回null
Definition:
NosTransferInfo.java:111
com.netease.nimlib.sdk
Definition:
RequestCallback.java:1
com.netease.nimlib.sdk.nos.model.NosTransferInfo.transferType
TransferType transferType
上传or下载
Definition:
NosTransferInfo.java:20
com.netease.nimlib.sdk.nos.model.NosTransferInfo.status
NosTransferStatus status
文件传输状态
Definition:
NosTransferInfo.java:50
com.netease.nimlib.sdk.nos.model.NosTransferInfo.setTransferType
void setTransferType(TransferType transferType)
设置当前传输是上传还是下载
Definition:
NosTransferInfo.java:172
com.netease.nimlib.sdk.nos.model.NosTransferInfo.setExtension
void setExtension(String extension)
设置文件后缀名
Definition:
NosTransferInfo.java:136
com.netease
com
com.netease.nimlib.sdk.nos.model.NosTransferInfo.path
String path
文件路径
Definition:
NosTransferInfo.java:25
com.netease.nimlib.sdk.nos.model.NosTransferInfo.getKey
String getKey()
返回当前文件传输的唯一标识
Definition:
NosTransferInfo.java:181
com.netease.nimlib.sdk.nos.model.NosTransferInfo.setSize
void setSize(long size)
设置文件大小,单位为byte
Definition:
NosTransferInfo.java:84
com.netease.nimlib.sdk.nos.model.NosTransferInfo.url
String url
文件下载地址
Definition:
NosTransferInfo.java:40
com.netease.nimlib.sdk.nos.model.NosTransferInfo.setStatus
void setStatus(NosTransferStatus status)
设置文件传输当前状态
Definition:
NosTransferInfo.java:154
com.netease.nimlib.sdk.nos.model.NosTransferInfo.extension
String extension
文件后缀名
Definition:
NosTransferInfo.java:45
com.netease.nimlib.sdk.nos.model.NosTransferInfo.getSize
long getSize()
获取文件大小,单位为byte
Definition:
NosTransferInfo.java:75
com.netease.nimlib.sdk.nos.model.NosTransferInfo.getTransferType
TransferType getTransferType()
返回当前传输是上传还是下载
Definition:
NosTransferInfo.java:163
com.netease.nimlib.sdk.nos.model.NosTransferInfo.size
long size
文件大小
Definition:
NosTransferInfo.java:30
com.netease.nimlib.sdk.nos.model.NosTransferInfo.TransferType.UPLOAD
UPLOAD
Definition:
NosTransferInfo.java:13
com.netease.nimlib.sdk.nos.constant.NosTransferStatus
NOS文件传输状态枚举类
Definition:
NosTransferStatus.java:6
com.netease.nimlib.sdk.nos.model.NosTransferInfo.getPath
String getPath()
获取文件本地路径
Definition:
NosTransferInfo.java:57
com.netease.nimlib.sdk.nos.model.NosTransferInfo.setMd5
void setMd5(String md5)
设置文件内容MD5
Definition:
NosTransferInfo.java:102
com.netease.nimlib.sdk.nos
com.netease.nimlib.sdk.nos.constant
Definition:
NosTransferStatus.java:1
com.netease.nimlib.sdk.nos.model.NosTransferInfo.getStatus
NosTransferStatus getStatus()
获取文件传输当前状态
Definition:
NosTransferInfo.java:145
com.netease.nimlib.sdk.nos.constant.NosTransferStatus.def
def
默认状态,未开始
Definition:
NosTransferStatus.java:11
com.netease.nimlib.sdk.nos.model.NosTransferInfo.getMd5
String getMd5()
获取文件内容MD5
Definition:
NosTransferInfo.java:93
com.netease.nimlib
com.netease.nimlib.sdk.nos.model.NosTransferInfo.setPath
void setPath(String path)
设置文件路径
Definition:
NosTransferInfo.java:66
生成于 2024年 十月 15日 星期二 18:40:25 , 为 NIMSDK-AOS使用
1.8.13