public class DataPacketExtension extends Object implements ExtensionElement
Modifier and Type | Field and Description |
---|---|
static String |
ELEMENT
The element name of the data stanza extension.
|
static String |
NAMESPACE
The XMPP namespace of the In-Band Bytestream.
|
Constructor and Description |
---|
DataPacketExtension(String sessionID,
long seq,
String data)
Creates a new In-Band Bytestream data packet.
|
Modifier and Type | Method and Description |
---|---|
String |
getData()
Returns the data contained in this packet.
|
byte[] |
getDecodedData()
Returns the decoded data or null if data could not be decoded.
|
String |
getElementName()
Returns the root element name.
|
protected IQ.IQChildElementXmlStringBuilder |
getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder xml) |
String |
getNamespace()
Returns the root element XML namespace.
|
long |
getSeq()
Returns the sequence of this stanza in regard to the other data packets.
|
String |
getSessionID()
Returns the unique session ID identifying this In-Band Bytestream.
|
XmlStringBuilder |
toXML(String enclosingNamespace)
Returns the XML representation of this Element.
|
public static final String ELEMENT
public static final String NAMESPACE
public DataPacketExtension(String sessionID, long seq, String data)
sessionID
- unique session ID identifying this In-Band Bytestreamseq
- sequence of this stanza in regard to the other data packetsdata
- the base64 encoded data contained in this packetpublic String getSessionID()
public long getSeq()
public 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 String getElementName()
NamedElement
getElementName
in interface NamedElement
public String getNamespace()
ExtensionElement
getNamespace
in interface ExtensionElement
public XmlStringBuilder toXML(String enclosingNamespace)
Element
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder xml)