正在查看: bbinstant v6.24.0 应用的 Open.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: bbinstant v6.24.0 应用的 Open.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package org.jivesoftware.smackx.bytestreams.ibb.packet;
import java.util.Locale;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager;
public class Open extends IQ {
public static final String ELEMENT = "open";
public static final String NAMESPACE = "http://jabber.org/protocol/ibb";
private final int blockSize;
private final String sessionID;
private final InBandBytestreamManager.StanzaType stanza;
public Open(String str, int i, InBandBytestreamManager.StanzaType stanzaType) {
super("open", "http://jabber.org/protocol/ibb");
if (str == null || "".equals(str)) {
throw new IllegalArgumentException("Session ID must not be null or empty");
}
if (i <= 0) {
throw new IllegalArgumentException("Block size must be greater than zero");
}
this.sessionID = str;
this.blockSize = i;
this.stanza = stanzaType;
setType(IQ.Type.set);
}
public int getBlockSize() {
return this.blockSize;
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.attribute("block-size", Integer.toString(this.blockSize));
iQChildElementXmlStringBuilder.attribute("sid", this.sessionID);
iQChildElementXmlStringBuilder.attribute("stanza", this.stanza.toString().toLowerCase(Locale.US));
iQChildElementXmlStringBuilder.setEmptyElement();
return iQChildElementXmlStringBuilder;
}
public String getSessionID() {
return this.sessionID;
}
public InBandBytestreamManager.StanzaType getStanza() {
return this.stanza;
}
public Open(String str, int i) {
this(str, i, InBandBytestreamManager.StanzaType.IQ);
}
}