正在查看: bbinstant v6.24.0 应用的 Compress.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: bbinstant v6.24.0 应用的 Compress.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package org.jivesoftware.smack.compress.packet;
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("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("method", this.method);
xmlStringBuilder.closeElement(this);
return xmlStringBuilder;
}
}