FileDocCategorySizeDatePackage
SerializableClass.javaAPI DocExample2361Thu Mar 16 11:52:38 GMT 2000None

SerializableClass

public class SerializableClass extends NotSerializableClass implements Serializable

Fields Summary
private transient int
nCalls
private transient int
y
Constructors Summary
public SerializableClass(int x, int y)

        super(x);
        this.y = y;
    
Methods Summary
public intgetNCalls()

        return nCalls;
    
public intgetX()

        nCalls++;
        return super.getX();
    
public intgetY()

        nCalls++;
        return y;
    
private voidreadObject(java.io.ObjectInputStream ois)

        ois.defaultReadObject();
        y = ((Integer) ois.readObject()).intValue() - 13;
        x = ois.readInt();
        nCalls = 5;
    
private voidwriteObject(java.io.ObjectOutputStream oos)

        oos.defaultWriteObject();
        oos.writeObject(new Integer(y + 13));
        oos.writeInt(x);