public class LCIMFileMessage extends LCIMTypedMessage
LCIMMessage.MessageIOType, LCIMMessage.MessageStatus
Modifier and Type | Field and Description |
---|---|
static String |
DURATION |
protected Map<String,Object> |
file |
static String |
FORMAT |
bytes, content, conversationId, currentClient, deliveredAt, from, ioType, mentionAll, mentionList, messageId, readAt, status, timestamp, uniqueToken, updateAt
Constructor and Description |
---|
LCIMFileMessage() |
LCIMFileMessage(File localFile) |
LCIMFileMessage(LCFile file) |
LCIMFileMessage(String localPath) |
Modifier and Type | Method and Description |
---|---|
void |
attachLCFile(LCFile file,
boolean keepName) |
boolean |
equals(Object other) |
protected void |
fulFillFileInfo(SaveCallback callback) |
protected void |
getAdditionalMetaData(Map<String,Object> meta,
SaveCallback callback) |
Map<String,Object> |
getAttrs() |
Map<String,Object> |
getFile() |
Map<String,Object> |
getFileMetaData()
获取文件的metaData
|
String |
getFileUrl()
获取文件地址
|
LCFile |
getLCFile()
获取文件消息中得 LCFile 对象
|
String |
getLocalFilePath()
获取本地文件地址,如果用户并未指定任何本地文件,则返回 null
|
protected String |
getQueryName() |
long |
getSize()
获取文件大小
|
String |
getText() |
int |
hashCode() |
protected void |
parseAdditionalMetaData(Map<String,Object> meta,
JSONObject response) |
void |
setAttrs(Map<String,Object> attr) |
protected void |
setFile(Map<String,Object> file) |
protected void |
setHasAdditionalMetaAttr(boolean hasAdditionalMetaAttr) |
void |
setProgressCallback(ProgressCallback callback)
设置文件上传进度回调
|
void |
setText(String text) |
protected void |
upload(SaveCallback callback) |
computeFieldAttribute, getContent, getMessage, getMessageType, setContent, setMessageType
dumpRawData, generateUniqueToken, getConversationId, getDeliveredAt, getFrom, getMentionList, getMentionListString, getMessageId, getMessageIOType, getMessageStatus, getReadAt, getReceiptTimestamp, getTimestamp, getUniqueToken, getUpdateAt, getUpdatedAt, isMentionAll, mentioned, parseJSON, parseJSONString, setConversationId, setFrom, setMentionAll, setMentionList, setMentionListString, setMessageId, setMessageIOType, setMessageStatus, setReadAt, setReceiptTimestamp, setTimestamp, setUniqueToken, setUpdateAt, setUpdatedAt, toJSONString
public static final String FORMAT
public static final String DURATION
public LCIMFileMessage()
public LCIMFileMessage(String localPath) throws IOException
IOException
public LCIMFileMessage(File localFile) throws IOException
IOException
public LCIMFileMessage(LCFile file)
public String getLocalFilePath()
public LCFile getLCFile()
public void attachLCFile(LCFile file, boolean keepName)
protected void setHasAdditionalMetaAttr(boolean hasAdditionalMetaAttr)
public String getFileUrl()
public long getSize()
protected void upload(SaveCallback callback)
public void setProgressCallback(ProgressCallback callback)
callback
- callback function.public String getText()
public void setText(String text)
protected void fulFillFileInfo(SaveCallback callback)
protected String getQueryName()
protected void parseAdditionalMetaData(Map<String,Object> meta, JSONObject response)
protected void getAdditionalMetaData(Map<String,Object> meta, SaveCallback callback)
public int hashCode()
hashCode
in class LCIMTypedMessage
public boolean equals(Object other)
equals
in class LCIMTypedMessage
Copyright © 2020, 美味书签(北京)信息技术有限公司 All rights reserved.