@ 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 ( ) ) ; } }
Requires special handling during de - serialization process .