hyphenate_SDK4.0 4.6.0
hyphenate java IM SDK
| 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)
 
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)
 
- Public 成员函数 继承自 com.hyphenate.chat.EMMessageBody
long operationTime ()
 
String operatorId ()
 
int operationCount ()
 

详细描述

文件类消息的基类。

构造及析构函数说明

◆ EMFileMessageBody() [1/2]

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

文件类型消息体构造方法。

参数
localPath文件的绝对路径或者资源标志符的字符串形式。

◆ EMFileMessageBody() [2/2]

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

文件类型消息体构造方法。

参数
localPath文件的资源标志符。

成员函数说明

◆ displayName()

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

获取文件名。

返回
文件名。

◆ downloadStatus()

EMDownloadStatus com.hyphenate.chat.EMFileMessageBody.downloadStatus ( )

获取文件的下载状态。

返回
文件的下载状态。

正在下载文件消息。

下载文件消息成功。

下载文件消息失败。

文件消息下载正在等待中。

该状态已废弃。请改用 EMDownloadStatusSucceed

◆ getFileName()

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

获得文件名。

返回
文件名。

com.hyphenate.chat.EMImageMessageBody 重载.

◆ getLocalUri()

Uri com.hyphenate.chat.EMFileMessageBody.getLocalUri ( )

本地图片、语音等文件的资源标识符 URI。

返回
本地图片、语音等文件的 URI。

◆ getLocalUrl()

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

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

返回
本地文件的绝对路径及资源标志符的字符串形式。

◆ getRemoteUrl()

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

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

返回
文件的服务器路径。

◆ getSecret()

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

获取服务器生成的文件的密钥。

返回
服务器生成的文件的密钥。

◆ setDownloadStatus()

void com.hyphenate.chat.EMFileMessageBody.setDownloadStatus ( EMDownloadStatus  status)

设置文件的下载状态。

参数
status文件的下载状态。

◆ setFileLength()

void com.hyphenate.chat.EMFileMessageBody.setFileLength ( long  length)

设置文件大小,以字节为单位。

参数
length文件大小,以字节为单位。

◆ setFileName()

void com.hyphenate.chat.EMFileMessageBody.setFileName ( String  fileName)

设置文件名。

参数
fileName文件名。

◆ setLocalUrl() [1/2]

void com.hyphenate.chat.EMFileMessageBody.setLocalUrl ( String  localUrl)

设置本地文件路径。

参数
localUrl文件的绝对路径或者资源标志符的字符串形式。

◆ setLocalUrl() [2/2]

void com.hyphenate.chat.EMFileMessageBody.setLocalUrl ( Uri  localUrl)

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

参数
localUrl文件的资源标志符。

◆ setRemoteUrl()

void com.hyphenate.chat.EMFileMessageBody.setRemoteUrl ( String  remoteUrl)

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

参数
remoteUrl文件的服务器地址。

◆ setSecret()

void com.hyphenate.chat.EMFileMessageBody.setSecret ( String  secret)

设置文件的密钥,此方法一般由 SDK 调用。

参数
secret文件的密钥。

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