@Override public void serializeVerssion2_8(DataOutputStream dataOutputStream) throws IOException { dataOutputStream.writeInt(orgUnits.size()); for (MobileOrgUnitLinks unit : orgUnits) { unit.serializeVerssion2_8(dataOutputStream); } }
@Override public void serializeVerssion2_9(DataOutputStream dataOutputStream) throws IOException { // send the current version to client for updating or not dataOutputStream.writeDouble(MobileOrgUnitLinks.currentVersion); dataOutputStream.writeInt(orgUnits.size()); for (MobileOrgUnitLinks unit : orgUnits) { unit.serializeVerssion2_9(dataOutputStream); } }
@Override public void deSerialize(DataInputStream dataInputStream) throws IOException { orgUnits = new ArrayList<MobileOrgUnitLinks>(); dataInputStream.readDouble(); // TODO fix int size = dataInputStream.readInt(); for (int i = 0; i < size; i++) { MobileOrgUnitLinks unit = new MobileOrgUnitLinks(); unit.deSerialize(dataInputStream); orgUnits.add(unit); } }