思特奇智慧酒店云平台 v0.0.5版本的 MD5 值为:dedb172bb322639d79d7e0e26262fb5c
以下内容为反编译后的 OfflineMessageInfo.java 源代码,内容仅作参考
package org.jivesoftware.smackx.offline.packet;
import java.io.IOException;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
public class OfflineMessageInfo implements ExtensionElement {
public String node = null;
public static class Provider extends ExtensionElementProvider<OfflineMessageInfo> {
@Override
public OfflineMessageInfo parse(XmlPullParser xmlPullParser, int i) throws XmlPullParserException, IOException {
OfflineMessageInfo offlineMessageInfo = new OfflineMessageInfo();
boolean z = false;
while (!z) {
int next = xmlPullParser.next();
if (next == 2) {
if (xmlPullParser.getName().equals("item")) {
offlineMessageInfo.setNode(xmlPullParser.getAttributeValue("", "node"));
}
} else if (next == 3 && xmlPullParser.getName().equals(OfflineMessageRequest.ELEMENT)) {
z = true;
}
}
return offlineMessageInfo;
}
}
@Override
public String getElementName() {
return OfflineMessageRequest.ELEMENT;
}
@Override
public String getNamespace() {
return "http://jabber.org/protocol/offline";
}
public String getNode() {
return this.node;
}
public void setNode(String str) {
this.node = str;
}
@Override
public String toXML(String str) {
StringBuilder sb = new StringBuilder();
sb.append('<');
sb.append(getElementName());
sb.append(" xmlns=\"");
sb.append(getNamespace());
sb.append("\">");
if (getNode() != null) {
sb.append("<item node=\"");
sb.append(getNode());
sb.append("\"/>");
}
sb.append("</");
sb.append(getElementName());
sb.append('>');
return sb.toString();
}
}