public class PacketParserUtils extends Object
| Constructor and Description |
|---|
PacketParserUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Collection<String> |
parseCompressionMethods(org.dom4j.Element compressionEl)
Parse the available compression methods reported from the server.
|
static String |
parseContentDepth(org.xmlpull.v1.XmlPullParser parser,
int depth) |
static Collection<String> |
parseMechanisms(org.dom4j.Element mechanismsEl)
Parse the available SASL mechanisms reported from the server.
|
static PacketExtension |
parsePacketExtension(String elementName,
String namespace,
org.xmlpull.v1.XmlPullParser parser)
Parses a packet extension sub-packet.
|
static StreamError |
parseStreamError(org.dom4j.Element el)
Parses stream error packets.
|
static Object |
parseWithIntrospection(String elementName,
Class<?> objectClass,
org.xmlpull.v1.XmlPullParser parser) |
static void |
updateText(org.dom4j.Element parentEl,
String elName,
String text) |
public static String parseContentDepth(org.xmlpull.v1.XmlPullParser parser, int depth) throws org.xmlpull.v1.XmlPullParserException, IOException
org.xmlpull.v1.XmlPullParserExceptionIOExceptionpublic static StreamError parseStreamError(org.dom4j.Element el) throws IOException, org.xmlpull.v1.XmlPullParserException
doc - the XML parser.Exception - if an exception occurs while parsing the packet.IOExceptionorg.xmlpull.v1.XmlPullParserExceptionpublic static Collection<String> parseMechanisms(org.dom4j.Element mechanismsEl) throws Exception
mechanismsEl - the XML parser, positioned at the start of the mechanisms
stanza.Exception - if an exception occurs while parsing the stanza.public static Collection<String> parseCompressionMethods(org.dom4j.Element compressionEl) throws IOException, org.xmlpull.v1.XmlPullParserException
compressionEl - the XML parser, positioned at the start of the compression
stanza.Exception - if an exception occurs while parsing the stanza.IOExceptionorg.xmlpull.v1.XmlPullParserExceptionpublic static PacketExtension parsePacketExtension(String elementName, String namespace, org.xmlpull.v1.XmlPullParser parser) throws Exception
elementName - the XML element name of the packet extension.namespace - the XML namespace of the packet extension.parser - the XML parser, positioned at the starting element of the
extension.Exception - if a parsing error occurs.public static Object parseWithIntrospection(String elementName, Class<?> objectClass, org.xmlpull.v1.XmlPullParser parser) throws Exception
ExceptionCopyright © 2014. All Rights Reserved.