Signaling (previously RTM) SDK v1.5.0 API Reference for Linux (Java)
Public Member Functions | List of all members
io.agora.rtm.RtmFileMessage Class Referenceabstract

Inherits io.agora.rtm.RtmMessage.

Public Member Functions

abstract long  getSize ()
 
abstract String  getMediaId ()
 
abstract void  setThumbnail (byte[] thumbnail)
 
abstract byte[]  getThumbnail ()
 
abstract void  setFileName (String fileName)
 
abstract String  getFileName ()
 
- Public Member Functions inherited from io.agora.rtm.RtmMessage
abstract void  setText (String text)
 
abstract String  getText ()
 
abstract void  setRawMessage (byte[] data)
 
abstract void  setRawMessage (byte[] data, String description)
 
abstract byte[]  getRawMessage ()
 
abstract int  getMessageType ()
 
abstract long  getServerReceivedTs ()
 
abstract boolean  isOfflineMessage ()
 

Detailed Description

The class for setting and retrieving attributes of a file message.

Member Function Documentation

◆ getSize()

abstract long io.agora.rtm.RtmFileMessage.getSize ( )
abstract

Gets the size of the uploaded file.

Returns
The size of the uploaded file in bytes.

◆ getMediaId()

abstract String io.agora.rtm.RtmFileMessage.getMediaId ( )
abstract

Gets the media ID of the uploaded file.

Note
  • The media ID is automatically populated once the file is uploaded to the file server.
  • The media ID is valid for 7 days because the Agora server keeps all uploaded files for 7 days only.
Returns
The media ID of the uploaded file.

◆ setThumbnail()

abstract void io.agora.rtm.RtmFileMessage.setThumbnail ( byte[]  thumbnail )
abstract

Sets the thumbnail of the uploaded file.

Parameters
thumbnail The thumbnail of the uploaded file. Must be binary data. The total size of thumbnail and fileName must not exceed 32 KB.

◆ getThumbnail()

abstract byte[] io.agora.rtm.RtmFileMessage.getThumbnail ( )
abstract

Gets the thumbnail of the uploaded file.

Returns
The thumbnail of the uploaded file.

◆ setFileName()

abstract void io.agora.rtm.RtmFileMessage.setFileName ( String  fileName )
abstract

Sets the name of the uploaded file.

Parameters
fileName The name of the uploaded file. The total size of thumbnail and fileName must not exceed 32 KB.

◆ getFileName()

abstract String io.agora.rtm.RtmFileMessage.getFileName ( )
abstract

Gets the name of the uploaded file.

Returns
The filename of the uploaded file.