public class FileElement
extends org.jivesoftware.smackx.packet.StreamInitiation.File
implements org.jivesoftware.smack.provider.IQProvider
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ELEMENT_NAME
The element name of this IQProvider.
|
static java.lang.String |
NAMESPACE
The namespace of this IQProvider.
|
Constructor and Description |
---|
FileElement()
An empty constructor used to initialize this class as an
IQProvider.
|
FileElement(org.jivesoftware.smackx.packet.StreamInitiation.File baseFile,
ThumbnailElement thumbnail)
Creates a FileElement by specifying a base file and a thumbnail
to extend it with.
|
FileElement(java.lang.String name,
long size)
Creates a FileElement by specifying the name and the size of the
file.
|
Modifier and Type | Method and Description |
---|---|
ThumbnailElement |
getThumbnailElement()
Returns the ThumbnailElement contained in this
FileElement.
|
org.jivesoftware.smack.packet.IQ |
parseIQ(org.xmlpull.v1.XmlPullParser parser)
Parses the given parser in order to create a
FileElement from it.
|
void |
setThumbnailElement(ThumbnailElement thumbnail)
Sets the given thumbnail to this FileElement.
|
java.lang.String |
toXML()
Represents this FileElement in an XML.
|
public static final java.lang.String ELEMENT_NAME
public static final java.lang.String NAMESPACE
public FileElement()
public FileElement(org.jivesoftware.smackx.packet.StreamInitiation.File baseFile, ThumbnailElement thumbnail)
baseFile
- the file used as a basethumbnail
- the thumbnail to addpublic FileElement(java.lang.String name, long size)
name
- the name of the filesize
- the size of the filepublic java.lang.String toXML()
toXML
in interface org.jivesoftware.smack.packet.PacketExtension
toXML
in class org.jivesoftware.smackx.packet.StreamInitiation.File
StreamInitiation.File.toXML()
public ThumbnailElement getThumbnailElement()
public void setThumbnailElement(ThumbnailElement thumbnail)
thumbnail
- the ThumbnailElement to setpublic org.jivesoftware.smack.packet.IQ parseIQ(org.xmlpull.v1.XmlPullParser parser) throws java.lang.Exception
parseIQ
in interface org.jivesoftware.smack.provider.IQProvider
parser
- the parser to parsejava.lang.Exception
IQProvider.parseIQ(XmlPullParser)
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.