private void writeObject ( ObjectOutputStream out ) throws IOException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "writeObject: " + this ) ; // Use v1 unless features are present that require v2. int version = Constants . TIMER_TASK_V1 ; if ( parsedSchedule != null ) { version = Constants . TIMER_TASK_V2 ; } out . defaultWriteObject ( ) ; // Write out header information first. out . write ( EYECATCHER ) ; out . writeShort ( PLATFORM ) ; out . writeShort ( version ) ; // Write out the instance data. out . writeObject ( j2eeName . getBytes ( ) ) ; out . writeObject ( userInfoBytes ) ; switch ( version ) { case Constants . TIMER_TASK_V1 : out . writeLong ( expiration ) ; out . writeLong ( interval ) ; break ; case Constants . TIMER_TASK_V2 : out . writeObject ( parsedSchedule ) ; out . writeInt ( methodId ) ; out . writeObject ( automaticMethodName ) ; out . writeObject ( automaticClassName ) ; break ; default : // cannot occur since initialize above break ; } if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "writeObject" ) ; }
Write this object to the ObjectOutputStream .