public class ThumbnailElement
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CID
The name of the thumbnail attribute "cid".
|
static java.lang.String |
ELEMENT_NAME
The name of the XML element used for transport of thumbnail parameters.
|
static java.lang.String |
HEIGHT
The name of the thumbnail attribute "height".
|
static java.lang.String |
MIME_TYPE
The name of the thumbnail attribute "mime-type".
|
static java.lang.String |
NAMESPACE
The names XMPP space that the thumbnail elements belong to.
|
static java.lang.String |
WIDTH
The name of the thumbnail attribute "width".
|
Constructor and Description |
---|
ThumbnailElement(java.lang.String serverAddress,
byte[] thumbnailData,
java.lang.String mimeType,
int width,
int height)
Creates a ThumbnailPacketExtension by specifying all extension
attributes.
|
ThumbnailElement(java.lang.String cid,
java.lang.String mimeType,
int width,
int height)
Creates a ThumbnailPacketExtension by specifying all extension
attributes.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCid()
Returns the Content-ID, corresponding to this ThumbnailElement.
|
int |
getHeight()
Returns the height of this ThumbnailElement.
|
java.lang.String |
getMimeType()
Returns the mime type of this ThumbnailElement.
|
int |
getWidth()
Returns the width of this ThumbnailElement.
|
static ThumbnailElement |
parseExtension(org.xmlpull.v1.XmlPullParser parser)
Creates a ThumbnailElement by using the given XML pull parser.
|
void |
setCid(java.lang.String cid)
Sets the content-ID of this ThumbnailElement.
|
void |
setHeight(int height)
Sets the height of the thumbnail
|
void |
setMimeType(java.lang.String mimeType)
Sets the mime type of the thumbnail.
|
void |
setWidth(int width)
Sets the width of the thumbnail
|
java.lang.String |
toXML()
Returns the XML representation of this PacketExtension.
|
public static final java.lang.String ELEMENT_NAME
public static final java.lang.String NAMESPACE
public static final java.lang.String CID
public static final java.lang.String MIME_TYPE
public static final java.lang.String WIDTH
public static final java.lang.String HEIGHT
public ThumbnailElement(java.lang.String cid, java.lang.String mimeType, int width, int height)
cid
- the content id attributemimeType
- the mime type attributewidth
- the width of the thumbnailheight
- the height of the thumbnailpublic ThumbnailElement(java.lang.String serverAddress, byte[] thumbnailData, java.lang.String mimeType, int width, int height)
serverAddress
- the Jabber address of the destination contactthumbnailData
- the byte array containing the thumbnail datamimeType
- the mime type attributewidth
- the width of the thumbnailheight
- the height of the thumbnailpublic static ThumbnailElement parseExtension(org.xmlpull.v1.XmlPullParser parser)
parser
- the XML pull parser from which we obtain the needed information to create
ThumbnailElementpublic java.lang.String toXML()
public java.lang.String getCid()
public java.lang.String getMimeType()
public int getWidth()
public int getHeight()
public void setCid(java.lang.String cid)
cid
- the content-ID to setpublic void setMimeType(java.lang.String mimeType)
mimeType
- the mime type of the thumbnailpublic void setWidth(int width)
width
- the width of the thumbnailpublic void setHeight(int height)
height
- the height of the thumbnail
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.