public static void writeObject ( ObjectOutputStream out , Object vendorData ) throws IOException { // write non-transient fields out . defaultWriteObject ( ) ; // check if should we serialize vendor data? if ( vendorData != null ) { // serialize the vendor data out . writeBoolean ( true ) ; // write the vendor data in a marshalled object so deserialization can be deferred out . writeObject ( new MarshalledObject ( vendorData ) ) ; } else out . writeBoolean ( false ) ; }
Write the current object and vendor - specific data to the output stream .