Package com.cometchat.pro.models
Class Attachment
- java.lang.Object
-
- com.cometchat.pro.models.Attachment
-
public class Attachment extends java.lang.ObjectAttachment class gives details of the media file
-
-
Constructor Summary
Constructors Constructor Description Attachment()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)static AttachmentfromJson(JSONObject attachmentObject)Get object of theAttachmentclass with file detailsjava.lang.StringgetFileExtension()java.lang.StringgetFileMimeType()Get mime type of the filejava.lang.StringgetFileName()Get name of the media fileintgetFileSize()Get size of the filejava.lang.StringgetFileUrl()Get url of the fileinthashCode()voidsetFileExtension(java.lang.String fileExtension)voidsetFileMimeType(java.lang.String fileMimeType)voidsetFileName(java.lang.String fileName)voidsetFileSize(int fileSize)voidsetFileUrl(java.lang.String fileUrl)java.lang.StringtoString()
-
-
-
Method Detail
-
getFileName
public java.lang.String getFileName()
Get name of the media file- Returns:
- Name of the file attached
- Since:
- v1
-
setFileName
public void setFileName(java.lang.String fileName)
-
getFileExtension
public java.lang.String getFileExtension()
- Returns:
- Extension of the file shared
- Since:
- v1
-
setFileExtension
public void setFileExtension(java.lang.String fileExtension)
-
getFileSize
public int getFileSize()
Get size of the file- Returns:
- Size of the file shared.
- Since:
- v1
-
setFileSize
public void setFileSize(int fileSize)
-
getFileMimeType
public java.lang.String getFileMimeType()
Get mime type of the file- Returns:
- Mime type of the file shared.
- Since:
- v1
-
setFileMimeType
public void setFileMimeType(java.lang.String fileMimeType)
-
getFileUrl
public java.lang.String getFileUrl()
Get url of the file- Returns:
- URL of the file shared.
- Since:
- v1
-
setFileUrl
public void setFileUrl(java.lang.String fileUrl)
-
fromJson
public static Attachment fromJson(JSONObject attachmentObject)
Get object of theAttachmentclass with file details- Parameters:
attachmentObject-- Returns:
- An object of the
Attachmentclass - Since:
- v1
- See Also:
Attachment
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-