Beispiel #1
0
 @Override
 public void writeExternal(ObjectOutput out) throws IOException {
   super.writeExternal(out);
   ExternalizableUtil.getInstance().writeSerializable(out, (DefaultElement) presence.getElement());
   ExternalizableUtil.getInstance().writeSafeUTF(out, nickname);
   ExternalizableUtil.getInstance().writeInt(out, role);
   ExternalizableUtil.getInstance().writeInt(out, affiliation);
 }
Beispiel #2
0
 @Override
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   super.readExternal(in);
   Element packetElement = (Element) ExternalizableUtil.getInstance().readSerializable(in);
   presence = new Presence(packetElement, true);
   nickname = ExternalizableUtil.getInstance().readSafeUTF(in);
   role = ExternalizableUtil.getInstance().readInt(in);
   affiliation = ExternalizableUtil.getInstance().readInt(in);
 }