hyphenate_SDK3.0  3.8.5
hyphenatejavaIMSDK
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

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
com.hyphenate.chat.EMFileMessageBody.EMFileMessageBody ( Uri  localPath)

Constructor method of file message body

Parameters
localPathUri of file

Member Function Documentation

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

Get the filename

Returns
The filename
EMDownloadStatus com.hyphenate.chat.EMFileMessageBody.downloadStatus ( )

Get the file download status

Returns
File download status
String com.hyphenate.chat.EMFileMessageBody.getFileName ( )

Get file name

Returns
File name
Uri com.hyphenate.chat.EMFileMessageBody.getLocalUri ( )

Get the Uri of local image, voice and so on

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
String com.hyphenate.chat.EMFileMessageBody.getRemoteUrl ( )

Get file's remote url

Returns
File's remote url
String com.hyphenate.chat.EMFileMessageBody.getSecret ( )

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

Returns
服务器生成的文件的token
void com.hyphenate.chat.EMFileMessageBody.setDownloadStatus ( EMDownloadStatus  status)

Set the file download status

Parameters
statusFile download status
void com.hyphenate.chat.EMFileMessageBody.setFileLength ( long  length)

Set file's length

Parameters
lengthFile length
void com.hyphenate.chat.EMFileMessageBody.setFileName ( String  fileName)

Set file name

Parameters
fileNameFile name
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
void com.hyphenate.chat.EMFileMessageBody.setLocalUrl ( Uri  localUrl)

Set the Uri of local file

Parameters
localUrlThe Uri of file
void com.hyphenate.chat.EMFileMessageBody.setRemoteUrl ( String  remoteUrl)

Set the remote url for file message body

Parameters
remoteUrlFile's remote url
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: