api/jar/src/main/java/javax/slee/management/VendorExtensionUtils.java
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);
    }
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.
@param out the object output stream that the current object is being written to.
@param vendorData the optional vendor data to include in the serialization stream.
@throws IOException if an I/O error occurs while writing to the output stream.