- All Known Implementing Classes:
AudioMessage
,DocumentMessage
,ExternalBlobReference
,HistorySyncNotification
,ImageMessage
,MediaMessage
,PaymentInvoiceMessage
,StickerMessage
,VideoMessage
public sealed interface AttachmentProvider
permits MediaMessage, ExternalBlobReference, HistorySyncNotification
A sealed interface that represents a class that can provide data about a media
-
Method Summary
Modifier and TypeMethodDescriptionReturns the direct path to the mediamediaDirectPath
(String mediaDirectPath) Sets the direct path of this providerbyte[]
Returns the sha256 of this encrypted mediamediaEncryptedSha256
(byte[] bytes) Sets the sha256 of the encrypted media in this providerbyte[]
mediaKey()
Returns the key of this mediamediaKey
(byte[] bytes) Sets the media key of this providerReturns the name of this media for Whatsappbyte[]
Returns the sha256 of this mediamediaSha256
(byte[] bytes) Sets the sha256 of the media in this providerlong
Returns the size of this mediamediaSize
(long mediaSize) Sets the size of this mediamediaUrl()
Returns the url to the mediaSets the media url of this provider
-
Method Details
-
mediaUrl
String mediaUrl()Returns the url to the media- Returns:
- a nullable String
-
mediaUrl
Sets the media url of this provider- Returns:
- the same provider
-
mediaDirectPath
String mediaDirectPath()Returns the direct path to the media- Returns:
- a nullable String
-
mediaDirectPath
Sets the direct path of this provider- Returns:
- the same provider
-
mediaKey
byte[] mediaKey()Returns the key of this media- Returns:
- a non-null array of bytes
-
mediaKey
Sets the media key of this provider- Returns:
- the same provider
-
mediaSha256
byte[] mediaSha256()Returns the sha256 of this media- Returns:
- a non-null array of bytes
-
mediaSha256
Sets the sha256 of the media in this provider- Returns:
- the same provider
-
mediaEncryptedSha256
byte[] mediaEncryptedSha256()Returns the sha256 of this encrypted media- Returns:
- a non-null array of bytes
-
mediaEncryptedSha256
Sets the sha256 of the encrypted media in this provider- Returns:
- the same provider
-
mediaSize
long mediaSize()Returns the size of this media- Returns:
- a long
-
mediaSize
Sets the size of this media- Returns:
- a long
-
mediaName
String mediaName()Returns the name of this media for Whatsapp- Returns:
- a non-null String
-