use of org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager.StanzaType in project Smack by igniterealtime.
the class OpenIQProvider method parse.
@Override
public Open parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {
String sessionID = parser.getAttributeValue("", "sid");
int blockSize = Integer.parseInt(parser.getAttributeValue("", "block-size"));
String stanzaValue = parser.getAttributeValue("", "stanza");
StanzaType stanza = null;
if (stanzaValue == null) {
stanza = StanzaType.IQ;
} else {
stanza = StanzaType.valueOf(stanzaValue.toUpperCase(Locale.US));
}
parser.next();
return new Open(sessionID, blockSize, stanza);
}
Aggregations