Class File
- java.lang.Object
-
- io.github.ma1uta.matrix.event.content.RoomMessageContent
-
- io.github.ma1uta.matrix.event.message.File
-
- All Implemented Interfaces:
EventContent
public class File extends RoomMessageContent
This message represents a generic file.
-
-
Constructor Summary
Constructors Constructor Description File()
-
Method Summary
Modifier and Type Method Description EncryptedFile
getFile()
String
getFilename()
FileInfo
getInfo()
String
getMsgtype()
Message type.String
getUrl()
void
setFile(EncryptedFile file)
void
setFilename(String filename)
void
setInfo(FileInfo info)
void
setUrl(String url)
-
Methods inherited from class io.github.ma1uta.matrix.event.content.RoomMessageContent
getBody, getRelatesTo, setBody, setRelatesTo
-
-
-
-
Field Detail
-
MSGTYPE
public static final String MSGTYPE
This message represents a generic file.- See Also:
- Constant Field Values
-
filename
private String filename
Required. The original filename of the uploaded file.
-
info
private FileInfo info
Information about the file referred to in url.
-
url
private String url
Required. The URL to the file.
-
file
private EncryptedFile file
Required if the file is encrypted. Information on the encrypted file, as specified in End-to-end encryption.
-
-
Method Detail
-
getFilename
public String getFilename()
-
setFilename
public void setFilename(String filename)
-
getInfo
public FileInfo getInfo()
-
setInfo
public void setInfo(FileInfo info)
-
getUrl
public String getUrl()
-
setUrl
public void setUrl(String url)
-
getFile
public EncryptedFile getFile()
-
setFile
public void setFile(EncryptedFile file)
-
getMsgtype
public String getMsgtype()
Description copied from class:RoomMessageContent
Message type.
Read-only.- Specified by:
getMsgtype
in classRoomMessageContent
- Returns:
- message type.
-
-