oos.defaultWriteObject();
}
private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
ois.defaultReadObject();
ois.registerValidation(new ObjectInputValidation() {
public void validateObject() throws InvalidObjectException {
if (!Integer.toString(number).equals(string)) {
throw new InvalidObjectException("No match");
}
}