private void writeObject ( ObjectOutputStream stream ) throws IOException { final Object [ ] lList = this . listeners ; stream . defaultWriteObject ( ) ; // Save the non-null event listeners: for ( int i = 0 ; i < lList . length ; i += 2 ) { final Class < ? > t = ( Class < ? > ) lList [ i ] ; final EventListener l = ( EventListener ) lList [ i + 1 ] ; if ( ( l != null ) && ( l instanceof Serializable ) ) { stream . writeObject ( t . getName ( ) ) ; stream . writeObject ( l ) ; } } stream . writeObject ( null ) ; }
Serialization support .