Code example for ObjectOutput

Methods: writeObject, writeUTF

0
     * To obtain the description of the Serialization of this class see the Serialized form of 
     * java.rmi.server.RemoteObject. 
     */ 
    public void writeExternal(ObjectOutput out) throws IOException {
 
        out.writeObject(id);
 
        if (ref == null) {
            out.writeUTF(""); //$NON-NLS-1$
        } else { 
            out.writeUTF(ref.getRefClass(out));
            ref.writeExternal(out);
        } 
    } 
 
    /** 
     * To obtain the description of the Serialization of this class see the Serialized form of 
     * java.rmi.server.RemoteObject. 
     */ 
    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
        id = (ActivationID) in.readObject();