CarrotChat v2.8.80.240429版本的 MD5 值为:fdf98761f01e715a89df24b85b0d206e
以下内容为反编译后的 SharedGroupsInfo.java 源代码,内容仅作参考
package org.jivesoftware.smackx.sharedgroups.packet;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
public class SharedGroupsInfo extends IQ {
public static final String ELEMENT = "sharedgroup";
public static final String NAMESPACE = "http://www.jivesoftware.org/protocol/sharedgroup";
private final List<String> groups;
public static class Provider extends IQProvider<SharedGroupsInfo> {
@Override
public SharedGroupsInfo parse(XmlPullParser xmlPullParser, int i10) throws XmlPullParserException, IOException {
SharedGroupsInfo sharedGroupsInfo = new SharedGroupsInfo();
boolean z10 = false;
while (!z10) {
int next = xmlPullParser.next();
if (next == 2 && xmlPullParser.getName().equals("group")) {
sharedGroupsInfo.getGroups().add(xmlPullParser.nextText());
} else if (next == 3 && xmlPullParser.getName().equals(SharedGroupsInfo.ELEMENT)) {
z10 = true;
}
}
return sharedGroupsInfo;
}
}
public SharedGroupsInfo() {
super(ELEMENT, NAMESPACE);
this.groups = new ArrayList();
}
public List<String> getGroups() {
return this.groups;
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.rightAngleBracket();
Iterator<String> it = this.groups.iterator();
while (it.hasNext()) {
iQChildElementXmlStringBuilder.element("group", it.next());
}
return iQChildElementXmlStringBuilder;
}
}