int arrayLength = objectInputStream.readInt(); data = newData(arrayLength);  for (int i = 0; i < size; ++i) { didAdd(i, assign(i, objectInputStream.readObject()));
for (int i = 0; i < size; ++i) { didAdd(i, assign(i, objectInputStream.readObject())); }
  private synchronized void readObject(ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException   {    objectInputStream.defaultReadObject();    int arrayLength = objectInputStream.readInt();    data = newData(arrayLength);     for (int i = 0; i < size; ++i)    {      didAdd(i, assign(i, objectInputStream.readObject()));    }  }