hyphenate_SDK3.0  3.8.5
hyphenatejavaIMSDK
| Public 成员函数 | 所有成员列表
com.hyphenate.chat.EMFileMessageBody类 参考abstract
类 com.hyphenate.chat.EMFileMessageBody 继承关系图:
com.hyphenate.chat.EMMessageBody com.hyphenate.chat.EMImageMessageBody com.hyphenate.chat.EMNormalFileMessageBody com.hyphenate.chat.EMVideoMessageBody com.hyphenate.chat.EMVoiceMessageBody

enum  EMDownloadStatus
 

Public 成员函数

 EMFileMessageBody (String localPath)
 
 EMFileMessageBody (Uri localPath)
 
 EMFileMessageBody (EMAFileMessageBody body)
 
String getFileName ()
 
void setFileName (String fileName)
 
String getLocalUrl ()
 
void setLocalUrl (String localUrl)
 
Uri getLocalUri ()
 
void setLocalUrl (Uri localUrl)
 
String getRemoteUrl ()
 
void setRemoteUrl (String remoteUrl)
 
void setSecret (String secret)
 
String getSecret ()
 
String displayName ()
 
void setFileLength (long length)
 
EMDownloadStatus downloadStatus ()
 
void setDownloadStatus (EMDownloadStatus status)
 

详细描述

文件类消息的基类

构造及析构函数说明

com.hyphenate.chat.EMFileMessageBody.EMFileMessageBody ( String  localPath)

文件类型消息体构造方法

参数
localPath文件的绝对路径或者资源标志符的字符串形式
com.hyphenate.chat.EMFileMessageBody.EMFileMessageBody ( Uri  localPath)

文件类型消息体构造方法

参数
localPath文件的资源标志符

成员函数说明

String com.hyphenate.chat.EMFileMessageBody.displayName ( )

获取文件名

返回
文件名
EMDownloadStatus com.hyphenate.chat.EMFileMessageBody.downloadStatus ( )

获取文件的下载状态

返回
文件的下载状态
String com.hyphenate.chat.EMFileMessageBody.getFileName ( )

获得文件名

返回
文件名
Uri com.hyphenate.chat.EMFileMessageBody.getLocalUri ( )

本地图片,语音等文件的资源标识符

返回
String com.hyphenate.chat.EMFileMessageBody.getLocalUrl ( )

本地图片,语音等文件的路径或者资源标志符的字符串形式

返回
本地文件的绝对路径及资源标志符的字符串形式
String com.hyphenate.chat.EMFileMessageBody.getRemoteUrl ( )

远程图片,声音等的服务器路径

返回
文件的服务器路径
String com.hyphenate.chat.EMFileMessageBody.getSecret ( )

获取服务器生成的文件的访问令牌

返回
服务器生成的文件的访问令牌
void com.hyphenate.chat.EMFileMessageBody.setDownloadStatus ( EMDownloadStatus  status)

设置文件的下载状态

参数
status文件的下载状态
void com.hyphenate.chat.EMFileMessageBody.setFileLength ( long  length)

设置文件大小

参数
length文件大小
void com.hyphenate.chat.EMFileMessageBody.setFileName ( String  fileName)

设置文件名

参数
fileName文件名
void com.hyphenate.chat.EMFileMessageBody.setLocalUrl ( String  localUrl)

设置本地文件路径

参数
localUrl文件的绝对路径或者资源标志符的字符串形式
void com.hyphenate.chat.EMFileMessageBody.setLocalUrl ( Uri  localUrl)

设置本地文件的资源标识符

参数
localUrl文件的资源标志符
void com.hyphenate.chat.EMFileMessageBody.setRemoteUrl ( String  remoteUrl)

设置文件消息体文件的服务器地址

参数
remoteUrl文件的服务器地址
void com.hyphenate.chat.EMFileMessageBody.setSecret ( String  secret)

设置文件的访问令牌,此方法一般由SDK调用

参数
secret文件的访问令牌

该类的文档由以下文件生成: