|
Smack | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jivesoftware.smack.util.PacketParserUtils
Utility class that helps to parse packets. Any parsing packets method that must be shared between many clients must be placed in this utility class.
Constructor Summary | |
PacketParserUtils()
|
Method Summary | |
static XMPPError |
parseError(org.xmlpull.v1.XmlPullParser parser)
Parses error sub-packets. |
static Packet |
parseMessage(org.xmlpull.v1.XmlPullParser parser)
Parses a message packet. |
static PacketExtension |
parsePacketExtension(String elementName,
String namespace,
org.xmlpull.v1.XmlPullParser parser)
Parses a packet extension sub-packet. |
static Presence |
parsePresence(org.xmlpull.v1.XmlPullParser parser)
Parses a presence packet. |
static Object |
parseWithIntrospection(String elementName,
Class objectClass,
org.xmlpull.v1.XmlPullParser parser)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PacketParserUtils()
Method Detail |
public static Packet parseMessage(org.xmlpull.v1.XmlPullParser parser) throws Exception
parser
- the XML parser, positioned at the start of a message packet.
Exception
- if an exception occurs while parsing the packet.public static Presence parsePresence(org.xmlpull.v1.XmlPullParser parser) throws Exception
parser
- the XML parser, positioned at the start of a presence packet.
Exception
- if an exception occurs while parsing the packet.public static XMPPError parseError(org.xmlpull.v1.XmlPullParser parser) throws Exception
parser
- the XML parser.
Exception
- if an exception occurs while parsing the packet.public 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
Exception
|
Smack | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |