CryptoMessage v1.3.2版本的 MD5 值为:66c611ce56a11450659dc23697562928
以下内容为反编译后的 StreamOpen.java 源代码,内容仅作参考
package org.jivesoftware.smack.packet;
import org.jivesoftware.smack.util.XmlStringBuilder;
public final class StreamOpen extends AbstractStreamOpen {
public static final String ELEMENT = "stream:stream";
public enum StreamContentNamespace {
client,
server
}
@Override
public String getElementName() {
return ELEMENT;
}
public StreamOpen(CharSequence charSequence) {
this(charSequence, null, null, null, StreamContentNamespace.client);
}
public StreamOpen(CharSequence charSequence, CharSequence charSequence2, String str) {
this(charSequence, charSequence2, str, "en", StreamContentNamespace.client);
}
public StreamOpen(CharSequence charSequence, CharSequence charSequence2, String str, String str2) {
super(charSequence, charSequence2, str, str2);
}
public StreamOpen(CharSequence charSequence, CharSequence charSequence2, String str, String str2, StreamContentNamespace streamContentNamespace) {
super(charSequence, charSequence2, str, str2, streamContentNamespace);
}
@Override
public String getNamespace() {
return this.contentNamespace;
}
@Override
public XmlStringBuilder toXML(XmlEnvironment xmlEnvironment) {
XmlStringBuilder xmlStringBuilder = new XmlStringBuilder();
xmlStringBuilder.halfOpenElement(getElementName());
xmlStringBuilder.attribute("xmlns", xmlEnvironment != null ? xmlEnvironment.getEffectiveNamespaceOrUse("jabber:client") : "jabber:client");
xmlStringBuilder.attribute("to", this.to);
xmlStringBuilder.attribute("xmlns:stream", "http://etherx.jabber.org/streams");
xmlStringBuilder.attribute("version", AbstractStreamOpen.VERSION);
xmlStringBuilder.optAttribute("from", this.from);
xmlStringBuilder.optAttribute("id", this.id);
xmlStringBuilder.xmllangAttribute(this.lang);
xmlStringBuilder.rightAngleBracket();
return xmlStringBuilder;
}
}