CarrotChat v2.8.80.240429版本的 MD5 值为:fdf98761f01e715a89df24b85b0d206e
以下内容为反编译后的 Compress.java 源代码,内容仅作参考
package org.jivesoftware.smack.compress.packet;
import com.meizu.cloud.pushsdk.constants.PushConstants;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.Nonza;
import org.jivesoftware.smack.util.XmlStringBuilder;
public class Compress implements Nonza {
public static final String ELEMENT = "compress";
public static final String NAMESPACE = "http://jabber.org/protocol/compress";
public final String method;
public static class Feature implements ExtensionElement {
public static final String ELEMENT = "compression";
public final List<String> methods;
public Feature(List<String> list) {
this.methods = list;
}
@Override
public String getElementName() {
return ELEMENT;
}
public List<String> getMethods() {
return Collections.unmodifiableList(this.methods);
}
@Override
public String getNamespace() {
return "http://jabber.org/protocol/compress";
}
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder xmlStringBuilder = new XmlStringBuilder((ExtensionElement) this);
xmlStringBuilder.rightAngleBracket();
Iterator<String> it = this.methods.iterator();
while (it.hasNext()) {
xmlStringBuilder.element(PushConstants.MZ_PUSH_MESSAGE_METHOD, it.next());
}
xmlStringBuilder.closeElement(this);
return xmlStringBuilder;
}
}
public Compress(String str) {
this.method = str;
}
@Override
public String getElementName() {
return ELEMENT;
}
@Override
public String getNamespace() {
return "http://jabber.org/protocol/compress";
}
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder xmlStringBuilder = new XmlStringBuilder((ExtensionElement) this);
xmlStringBuilder.rightAngleBracket();
xmlStringBuilder.element(PushConstants.MZ_PUSH_MESSAGE_METHOD, this.method);
xmlStringBuilder.closeElement(this);
return xmlStringBuilder;
}
}