Package com.cometchat.pro.models
Class Attachment
- java.lang.Object
-
- com.cometchat.pro.models.Attachment
-
public class Attachment extends java.lang.Object
Attachment 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 boolean
equals(java.lang.Object obj)
static Attachment
fromJson(JSONObject attachmentObject)
Get object of theAttachment
class with file details
java.lang.String
getFileExtension()
java.lang.String
getFileMimeType()
Get mime type of the filejava.lang.String
getFileName()
Get name of the media fileint
getFileSize()
Get size of the filejava.lang.String
getFileUrl()
Get url of the fileint
hashCode()
void
setFileExtension(java.lang.String fileExtension)
void
setFileMimeType(java.lang.String fileMimeType)
void
setFileName(java.lang.String fileName)
void
setFileSize(int fileSize)
void
setFileUrl(java.lang.String fileUrl)
java.lang.String
toString()
-
-
-
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 theAttachment
class with file details
- Parameters:
attachmentObject
-- Returns:
- An object of the
Attachment
class
- Since:
- v1
- See Also:
Attachment
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-