public class DataPacketExtension
extends java.lang.Object
implements org.jivesoftware.smack.packet.ExtensionElement
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ELEMENT
The element name of the data stanza(/packet) extension.
|
static java.lang.String |
NAMESPACE
The XMPP namespace of the In-Band Bytestream
|
Constructor and Description |
---|
DataPacketExtension(java.lang.String sessionID,
long seq,
java.lang.String data)
Creates a new In-Band Bytestream data packet.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getData()
Returns the data contained in this packet.
|
byte[] |
getDecodedData()
Returns the decoded data or null if data could not be decoded.
|
java.lang.String |
getElementName() |
protected org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder |
getIQChildElementBuilder(org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder xml) |
java.lang.String |
getNamespace() |
long |
getSeq()
Returns the sequence of this stanza(/packet) in regard to the other data packets.
|
java.lang.String |
getSessionID()
Returns the unique session ID identifying this In-Band Bytestream.
|
org.jivesoftware.smack.util.XmlStringBuilder |
toXML() |
public static final java.lang.String ELEMENT
public static final java.lang.String NAMESPACE
public DataPacketExtension(java.lang.String sessionID, long seq, java.lang.String data)
sessionID
- unique session ID identifying this In-Band Bytestreamseq
- sequence of this stanza(/packet) in regard to the other data packetsdata
- the base64 encoded data contained in this packetpublic java.lang.String getSessionID()
public long getSeq()
public java.lang.String getData()
public byte[] getDecodedData()
The encoded data is invalid if it contains bad Base64 input characters or if it contains the pad ('=') character on a position other than the last character(s) of the data. See XEP-0047 Section 6.
public java.lang.String getElementName()
getElementName
in interface org.jivesoftware.smack.packet.NamedElement
public java.lang.String getNamespace()
getNamespace
in interface org.jivesoftware.smack.packet.ExtensionElement
public org.jivesoftware.smack.util.XmlStringBuilder toXML()
toXML
in interface org.jivesoftware.smack.packet.Element
protected org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder xml)