code: @SuppressWarnings("unchecked")
    private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
      int capacity = stream.readInt();
      initialize(capacity);
      int size = stream.readInt();
      for (int i = 0; i < size; i++) {
        addEntry((K) stream.readObject(), (V) stream.readObject());
      }
    }
docs: Requires special handling during de-serialization process.
  
  @param stream the object input stream.
  @throws IOException if an I/O error occurs.
  @throws ClassNotFoundException if the class for the object de-serialized
  is not found.