hyphenate_SDK4.0 4.8.0
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)
 
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 Member Functions inherited from com.hyphenate.chat.EMMessageBody
long operationTime ()
 
String operatorId ()
 
int operationCount ()
 

Detailed Description

The base class of file type message.

Constructor & Destructor Documentation

◆ EMFileMessageBody() [1/2]

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

The constructor method of the file message body.

Parameters
localPathThe absolute path to the attachment file or the path to the URI as a string.

◆ EMFileMessageBody() [2/2]

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

The constructor method of the file message body.

Parameters
localPathThe localPath URI of the attachment file.

Member Function Documentation

◆ displayName()

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

Gets the filename.

Returns
The filename.

◆ downloadStatus()

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

Gets the download status of the attachment file.

Returns
The download status of the attachment file.

The SDK is downloading the file message.

The SDK successfully downloads the file message.

The SDK fails to download the file message.

File message download is pending.

This state is deprecated. Use EMDownloadStatusSucceed instead.

◆ getFileName()

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

Gets the file name.

Returns
The file name.

Reimplemented in com.hyphenate.chat.EMImageMessageBody.

◆ getLocalUri()

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

Gets the URI of the local image, voice and so on.

Returns
The URI of the local image, voice and so on.

◆ getLocalUrl()

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

The local path or the string in the form of URI of the file.

Returns
The local file path or the string form of URI.

◆ getRemoteUrl()

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

Gets the path of the attachment file in the server.

Returns
The path of the attachment file in the server.

◆ getSecret()

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

Gets the token for downloading the message attachment.

Returns
The file token generated by the server。

◆ setDownloadStatus()

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

Sets the download status of the attachment file.

Parameters
statusThe downloading status of the attachment file.

◆ setFileLength()

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

Sets the data length (bytes) of the attachment file.

Parameters
lengthThe data length (bytes) of the attachment file.

◆ setFileName()

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

Sets the file name.

Parameters
fileNameThe file name.

◆ setLocalUrl() [1/2]

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

Sets the local path of the file.

Parameters
localUrlThe absolute path to the file or the string form of URI.

◆ setLocalUrl() [2/2]

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

Sets the URI of the local file.

Parameters
localUrlThe URI of file.

◆ setRemoteUrl()

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

Sets the path of the attachment file in the server.

Parameters
remoteUrlThe path of the attachment file in the server.

◆ setSecret()

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

Sets the file's token, this method is typically invoked by the SDK.

Parameters
secretThe file's token.

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