agora_chat_SDK 1.0.6
agora java chat SDK
| Public 成员函数 | 所有成员列表
io.agora.chat.FileMessageBody类 参考abstract
类 io.agora.chat.FileMessageBody 继承关系图:
io.agora.chat.MessageBody io.agora.chat.ImageMessageBody io.agora.chat.NormalFileMessageBody io.agora.chat.VideoMessageBody io.agora.chat.VoiceMessageBody

enum  EMDownloadStatus
 

Public 成员函数

 FileMessageBody (String localPath)
 
 FileMessageBody (Uri localPath)
 
 FileMessageBody (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)
 

详细描述

文件类消息的基类。

构造及析构函数说明

◆ FileMessageBody() [1/2]

io.agora.chat.FileMessageBody.FileMessageBody ( String  localPath)

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

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

◆ FileMessageBody() [2/2]

io.agora.chat.FileMessageBody.FileMessageBody ( Uri  localPath)

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

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

成员函数说明

◆ displayName()

String io.agora.chat.FileMessageBody.displayName ( )

获取文件名。

返回
文件名。

◆ downloadStatus()

EMDownloadStatus io.agora.chat.FileMessageBody.downloadStatus ( )

获取文件的下载状态。

返回
文件的下载状态。

正在下载文件消息。

下载文件消息成功。

下载文件消息失败。

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

该状态已废弃。请改用 EMDownloadStatusSucceed

◆ getFileName()

String io.agora.chat.FileMessageBody.getFileName ( )

获得文件名。

返回
文件名。

io.agora.chat.ImageMessageBody 重载.

◆ getLocalUri()

Uri io.agora.chat.FileMessageBody.getLocalUri ( )

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

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

◆ getLocalUrl()

String io.agora.chat.FileMessageBody.getLocalUrl ( )

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

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

◆ getRemoteUrl()

String io.agora.chat.FileMessageBody.getRemoteUrl ( )

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

返回
文件的服务器路径。

◆ getSecret()

String io.agora.chat.FileMessageBody.getSecret ( )

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

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

◆ setDownloadStatus()

void io.agora.chat.FileMessageBody.setDownloadStatus ( EMDownloadStatus  status)

设置文件的下载状态。

参数
status文件的下载状态。

◆ setFileLength()

void io.agora.chat.FileMessageBody.setFileLength ( long  length)

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

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

◆ setFileName()

void io.agora.chat.FileMessageBody.setFileName ( String  fileName)

设置文件名。

参数
fileName文件名。

◆ setLocalUrl() [1/2]

void io.agora.chat.FileMessageBody.setLocalUrl ( String  localUrl)

设置本地文件路径。

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

◆ setLocalUrl() [2/2]

void io.agora.chat.FileMessageBody.setLocalUrl ( Uri  localUrl)

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

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

◆ setRemoteUrl()

void io.agora.chat.FileMessageBody.setRemoteUrl ( String  remoteUrl)

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

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

◆ setSecret()

void io.agora.chat.FileMessageBody.setSecret ( String  secret)

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

参数
secret文件的密钥。

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