CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 Nick.java 源代码,内容仅作参考
package org.jivesoftware.smackx.nick.packet;
import java.io.IOException;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
public class Nick implements ExtensionElement {
public static final String ELEMENT_NAME = "nick";
public static final String NAMESPACE = "http://jabber.org/protocol/nick";
private String name;
public static class Provider extends ExtensionElementProvider<Nick> {
@Override
public Nick parse(XmlPullParser xmlPullParser, int i) throws XmlPullParserException, IOException {
return new Nick(xmlPullParser.nextText());
}
}
public Nick(String str) {
this.name = null;
this.name = str;
}
@Override
public String getElementName() {
return "nick";
}
public String getName() {
return this.name;
}
@Override
public String getNamespace() {
return NAMESPACE;
}
public void setName(String str) {
this.name = str;
}
@Override
public String toXML() {
return "<nick xmlns=\"" + NAMESPACE + "\">" + getName() + "</nick>";
}
}