Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   roomParticipation = ExternalizableUtil.getInstance().readBoolean(in);
   if (roomParticipation) {
     participations = new ArrayList<ConversationParticipation>();
   } else {
     participations = new CopyOnWriteArrayList<ConversationParticipation>();
   }
   ExternalizableUtil.getInstance()
       .readExternalizableCollection(in, participations, getClass().getClassLoader());
 }
Exemplo n.º 4
0
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   userJID = new JID(ExternalizableUtil.getInstance().readSafeUTF(in));
   isDefault = ExternalizableUtil.getInstance().readBoolean(in);
   String xml = ExternalizableUtil.getInstance().readSafeUTF(in);
   try {
     Element element = localParser.get().read(new StringReader(xml)).getRootElement();
     updateList(element, false);
   } catch (Exception e) {
     Log.error("Error while parsing Privacy Property", e);
   }
 }
Exemplo n.º 5
0
 @Override
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   byte[] bytes = ExternalizableUtil.getInstance().readByteArray(in);
   // Retrieve the NodeID but try to use the singleton instance
   if (XMPPServer.getInstance().getNodeID().equals(bytes)) {
     nodeID = XMPPServer.getInstance().getNodeID();
   } else {
     nodeID = NodeID.getInstance(bytes);
   }
   available = ExternalizableUtil.getInstance().readBoolean(in);
 }
Exemplo n.º 6
0
 public void writeExternal(ObjectOutput out) throws IOException {
   ExternalizableUtil.getInstance().writeSafeUTF(out, jid.toString());
   ExternalizableUtil.getInstance().writeBoolean(out, nickname != null);
   if (nickname != null) {
     ExternalizableUtil.getInstance().writeSafeUTF(out, nickname);
   }
   ExternalizableUtil.getInstance().writeStrings(out, groups);
   ExternalizableUtil.getInstance().writeStrings(out, sharedGroups);
   ExternalizableUtil.getInstance().writeStrings(out, invisibleSharedGroups);
   ExternalizableUtil.getInstance().writeInt(out, recvStatus.getValue());
   ExternalizableUtil.getInstance().writeInt(out, subStatus.getValue());
   ExternalizableUtil.getInstance().writeInt(out, askStatus.getValue());
   ExternalizableUtil.getInstance().writeLong(out, rosterID);
 }
Exemplo n.º 7
0
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   jid = new JID(ExternalizableUtil.getInstance().readSafeUTF(in));
   if (ExternalizableUtil.getInstance().readBoolean(in)) {
     nickname = ExternalizableUtil.getInstance().readSafeUTF(in);
   }
   this.groups = new LinkedList<String>();
   ExternalizableUtil.getInstance().readStrings(in, groups);
   ExternalizableUtil.getInstance().readStrings(in, sharedGroups);
   ExternalizableUtil.getInstance().readStrings(in, invisibleSharedGroups);
   recvStatus = RecvType.getTypeFromInt(ExternalizableUtil.getInstance().readInt(in));
   subStatus = SubType.getTypeFromInt(ExternalizableUtil.getInstance().readInt(in));
   askStatus = AskType.getTypeFromInt(ExternalizableUtil.getInstance().readInt(in));
   rosterID = ExternalizableUtil.getInstance().readLong(in);
 }
Exemplo n.º 8
0
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   username = ExternalizableUtil.getInstance().readSafeUTF(in);
   name = ExternalizableUtil.getInstance().readSafeUTF(in);
   if (ExternalizableUtil.getInstance().readBoolean(in)) {
     email = ExternalizableUtil.getInstance().readSafeUTF(in);
   }
   creationDate = new Date(ExternalizableUtil.getInstance().readLong(in));
   modificationDate = new Date(ExternalizableUtil.getInstance().readLong(in));
 }
Exemplo n.º 9
0
 public void writeExternal(ObjectOutput out) throws IOException {
   ExternalizableUtil.getInstance().writeSafeUTF(out, username);
   ExternalizableUtil.getInstance().writeSafeUTF(out, getName());
   ExternalizableUtil.getInstance().writeBoolean(out, email != null);
   if (email != null) {
     ExternalizableUtil.getInstance().writeSafeUTF(out, email);
   }
   ExternalizableUtil.getInstance().writeLong(out, creationDate.getTime());
   ExternalizableUtil.getInstance().writeLong(out, modificationDate.getTime());
 }
Exemplo n.º 10
0
 public void writeExternal(ObjectOutput out) throws IOException {
   ExternalizableUtil.getInstance().writeSafeUTF(out, userJID.toString());
   ExternalizableUtil.getInstance().writeBoolean(out, isDefault);
   ExternalizableUtil.getInstance().writeSafeUTF(out, asElement().asXML());
 }
Exemplo n.º 11
0
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   nodeId = ExternalizableUtil.getInstance().readSafeUTF(in);
   serviceId = ExternalizableUtil.getInstance().readSafeUTF(in);
 }
Exemplo n.º 12
0
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   originator = ExternalizableUtil.getInstance().readBoolean(in);
   roomName = ExternalizableUtil.getInstance().readSafeUTF(in);
   subdomain = ExternalizableUtil.getInstance().readSafeUTF(in);
 }
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   super.readExternal(in);
   address = new JID(ExternalizableUtil.getInstance().readSafeUTF(in));
 }
 public void writeExternal(ObjectOutput out) throws IOException {
   super.writeExternal(out);
   ExternalizableUtil.getInstance().writeSafeUTF(out, address.toString());
 }
Exemplo n.º 15
0
 public void writeExternal(ObjectOutput out) throws IOException {
   ExternalizableUtil.getInstance().writeBoolean(out, roomParticipation);
   ExternalizableUtil.getInstance().writeExternalizableCollection(out, participations);
 }
Exemplo n.º 16
0
 public void writeExternal(ObjectOutput out) throws IOException {
   ExternalizableUtil.getInstance().writeSerializable(out, (DefaultElement) iq.getElement());
 }
Exemplo n.º 17
0
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   Element packetElement = (Element) ExternalizableUtil.getInstance().readSerializable(in);
   iq = new IQ(packetElement, true);
 }
Exemplo n.º 18
0
 public void writeExternal(ObjectOutput out) throws IOException {
   ExternalizableUtil.getInstance().writeBoolean(out, originator);
   ExternalizableUtil.getInstance().writeSafeUTF(out, roomName);
   ExternalizableUtil.getInstance().writeSafeUTF(out, subdomain);
 }
Exemplo n.º 19
0
 public void writeExternal(ObjectOutput out) throws IOException {
   ExternalizableUtil.getInstance().writeSafeUTF(out, nodeId);
   ExternalizableUtil.getInstance().writeSafeUTF(out, serviceId);
 }
Exemplo n.º 20
0
 @Override
 public void writeExternal(ObjectOutput out) throws IOException {
   ExternalizableUtil.getInstance().writeByteArray(out, nodeID.toByteArray());
   ExternalizableUtil.getInstance().writeBoolean(out, available);
 }