Code example for NotSerializableException

0
        super(cls); 
    } 
 
    @Override 
    public void calcSize(Object obj, CalcSizeStream css) throws NotSerializableException { 
        throw new NotSerializableException(cls.getName()); 
    } 
 
    @Override 
    public void write(Object obj, ObjectOutput out) throws NotSerializableException { 
        throw new NotSerializableException(cls.getName()); 
    } 
 
    @Override 
    public Object read(ObjectInput in) throws NotSerializableException { 
        throw new NotSerializableException(cls.getName()); 
    } 
 
    @Override 
    public void skip(ObjectInput in) throws NotSerializableException { 
        throw new NotSerializableException(cls.getName());