List of usage examples for java.io ObjectInputStream registerValidation
public void registerValidation(ObjectInputValidation obj, int prio) throws NotActiveException, InvalidObjectException
From source file:Main.java
private String readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { ObjectInputStream.GetField gf = in.readFields(); in.registerValidation(this, 0); return (String) gf.get("s", null); }
From source file:org.jfree.data.general.AbstractDataset.java
/** * Restores a serialized object.//from w w w .java2s . c o m * * @param stream the input stream. * * @throws IOException if there is an I/O problem. * @throws ClassNotFoundException if there is a problem loading a class. */ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); this.listenerList = new EventListenerList(); stream.registerValidation(this, 10); // see comments about priority of // 10 in validateObject() }