コード例 #1
0
ファイル: RosterItem.java プロジェクト: team-lab/openfire
 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);
 }
コード例 #2
0
ファイル: RosterItem.java プロジェクト: team-lab/openfire
 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);
 }