public static Object readObject(ObjectInputStream in, boolean vendorDataDeserializationEnabled) throws IOException, ClassNotFoundException {
        // read non-transient fields
        in.defaultReadObject();
        // read any possible marshalled vendor data from the stream
        MarshalledObject vendorData = in.readBoolean()
            ? (MarshalledObject)in.readObject()
            : null;
        // now figure out what to return
        return (vendorData != null && vendorDataDeserializationEnabled) ? vendorData.get() : null;
    }
public static Object readObject(ObjectInputStream in, boolean vendorDataDeserializationEnabled) throws IOException, ClassNotFoundException {
        
        in.defaultReadObject();
        
        MarshalledObject vendorData = in.readBoolean()
            ? (MarshalledObject)in.readObject()
            : null;
        
        return (vendorData != null && vendorDataDeserializationEnabled) ? vendorData.get() : null;
    }
public static Object readObject ( ObjectInputStream in , boolean vendorDataDeserializationEnabled ) throws IOException , ClassNotFoundException { // read non-transient fields in . defaultReadObject ( ) ; // read any possible marshalled vendor data from the stream MarshalledObject vendorData = in . readBoolean ( ) ? ( MarshalledObject ) in . readObject ( ) : null ; // now figure out what to return return ( vendorData != null && vendorDataDeserializationEnabled ) ? vendorData . get ( ) : null ; }
Read the current object in the input stream from the stream, optionally
deserializing any vendor-specific data in the stream.
@param in the object input stream that the current object is being read from.
@param vendorDataDeserializationEnabled boolean flag indicating whether or not
any vendor data in the serialization stream should be deserialized also.
@return the vendor-specific data, or <code>null</code> if there isn't any or the
value of the <code>vendorDataDeserializationEnabled</code> parameter was
<code>false</code>.
@throws IOException if an I/O error occurs while reading from the input stream.
@throws ClassNotFoundException if a class of the serialized objects could not
be found.
Read the current object in the input stream from the stream optionally deserializing any vendor - specific data in the stream .