hyphenate_SDK3.0  3.8.6.1
hyphenate java IM SDK
Classes | Public Member Functions | List of all members
com.hyphenate.chat.EMFileMessageBody Class Referenceabstract
Inheritance diagram for com.hyphenate.chat.EMFileMessageBody:
com.hyphenate.chat.EMMessageBody com.hyphenate.chat.EMImageMessageBody com.hyphenate.chat.EMNormalFileMessageBody com.hyphenate.chat.EMVideoMessageBody com.hyphenate.chat.EMVoiceMessageBody

Classes

enum  EMDownloadStatus
 

Public Member Functions

 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)
 

Detailed Description

The base class of file type message

Constructor & Destructor Documentation

◆ EMFileMessageBody() [1/2]

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

Constructor method of file message body

Parameters
localPathThe absolute path to the file or the path to the Uri as a string

◆ EMFileMessageBody() [2/2]

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

Constructor method of file message body

Parameters
localPathUri of file

Member Function Documentation

◆ displayName()

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

Get the filename

Returns
The filename

◆ downloadStatus()

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

Get the file download status

Returns
File download status

◆ getFileName()

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

Get file name

Returns
File name

Reimplemented in com.hyphenate.chat.EMImageMessageBody.

◆ getLocalUri()

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

Get the Uri of local image, voice and so on

◆ getLocalUrl()

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

Local file path or the string form of Uri

Returns
Local file path or the string form of Uri

◆ getRemoteUrl()

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

Get file's remote url

Returns
File's remote url

◆ getSecret()

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

获取服务器生成的文件的token

Returns
服务器生成的文件的token

◆ setDownloadStatus()

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

Set the file download status

Parameters
statusFile download status

◆ setFileLength()

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

Set file's length

Parameters
lengthFile length

◆ setFileName()

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

Set file name

Parameters
fileNameFile name

◆ setLocalUrl() [1/2]

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

Set local file path

Parameters
localUrlThe absolute path to the file or the string form of Uri

◆ setLocalUrl() [2/2]

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

Set the Uri of local file

Parameters
localUrlThe Uri of file

◆ setRemoteUrl()

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

Set the remote url for file message body

Parameters
remoteUrlFile's remote url

◆ setSecret()

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

Set file's token, this method is typically invoked by SDK

Parameters
secretFile's token

The documentation for this class was generated from the following file: