Class OmemoKeyElement
- java.lang.Object
-
- org.jivesoftware.smackx.omemo.element.OmemoKeyElement
-
- All Implemented Interfaces:
Element
,FullyQualifiedElement
,NamedElement
,XmlLangElement
public class OmemoKeyElement extends java.lang.Object implements FullyQualifiedElement
Small class to collect key (byte[]), its id and whether its a preKey or not.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTR_PREKEY
static java.lang.String
ATTR_RID
static java.lang.String
ELEMENT
static java.lang.String
NAMESPACE
-
Constructor Summary
Constructors Constructor Description OmemoKeyElement(byte[] data, int id)
OmemoKeyElement(byte[] data, int id, boolean preKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getData()
java.lang.String
getElementName()
Returns the root element name.int
getId()
java.lang.String
getNamespace()
Returns the root element XML namespace.boolean
isPreKey()
java.lang.String
toString()
XmlStringBuilder
toXML(XmlEnvironment enclosingXmlEnvironment)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jivesoftware.smack.packet.FullyQualifiedElement
getLanguage, getQName
-
-
-
-
Field Detail
-
ELEMENT
public static final java.lang.String ELEMENT
- See Also:
- Constant Field Values
-
NAMESPACE
public static final java.lang.String NAMESPACE
- See Also:
- Constant Field Values
-
ATTR_RID
public static final java.lang.String ATTR_RID
- See Also:
- Constant Field Values
-
ATTR_PREKEY
public static final java.lang.String ATTR_PREKEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OmemoKeyElement
public OmemoKeyElement(byte[] data, int id)
-
OmemoKeyElement
public OmemoKeyElement(byte[] data, int id, boolean preKey)
-
-
Method Detail
-
getId
public int getId()
-
getData
public byte[] getData()
-
isPreKey
public boolean isPreKey()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getElementName
public java.lang.String getElementName()
Description copied from interface:NamedElement
Returns the root element name.- Specified by:
getElementName
in interfaceNamedElement
- Returns:
- the element name.
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:FullyQualifiedElement
Returns the root element XML namespace.- Specified by:
getNamespace
in interfaceFullyQualifiedElement
- Returns:
- the namespace.
-
toXML
public XmlStringBuilder toXML(XmlEnvironment enclosingXmlEnvironment)
-
-