Java Code Examples for java.io.ObjectInputStream#registerValidation()

The following examples show how to use java.io.ObjectInputStream#registerValidation() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: netbeans   File: DataEditorSupport.java    License: Apache License 2.0 5 votes vote down vote up
private void readObject (ObjectInputStream ois) throws ClassNotFoundException, IOException {
    ois.defaultReadObject ();
    ois.registerValidation(new ObjectInputValidation() {
        public void validateObject() throws InvalidObjectException {
            warnedFiles.add(getFileImpl());
        }
    }, 0);
}
 
Example 2
private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
    ois.defaultReadObject();
    ois.registerValidation(this, 100);
}
 
Example 3
/**
 * Restores a serialized object.
 *
 * @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()
}
 
Example 4
/**
 * Restores a serialized object.
 *
 * @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()
}
 
Example 5
Source Project: SIMVA-SoS   File: AbstractDataset.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * Restores a serialized object.
 *
 * @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()
}
 
Example 6
Source Project: coming   File: Cardumen_001_s.java    License: MIT License 3 votes vote down vote up
/**
 * Restores a serialized object.
 *
 * @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() 
}
 
Example 7
Source Project: coming   File: Cardumen_001_t.java    License: MIT License 3 votes vote down vote up
/**
 * Restores a serialized object.
 *
 * @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() 
}
 
Example 8
Source Project: coming   File: JGenProg2017_001_s.java    License: MIT License 3 votes vote down vote up
/**
 * Restores a serialized object.
 *
 * @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() 
}
 
Example 9
Source Project: coming   File: JGenProg2017_001_t.java    License: MIT License 3 votes vote down vote up
/**
 * Restores a serialized object.
 *
 * @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() 
}
 
Example 10
/**
 * Restores a serialized object.
 *
 * @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()
}
 
Example 11
/**
 * Restores a serialized object.
 *
 * @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()
}
 
Example 12
/**
 * Restores a serialized object.
 *
 * @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() 
}
 
Example 13
Source Project: opensim-gui   File: AbstractDataset.java    License: Apache License 2.0 3 votes vote down vote up
/**
 * Restores a serialized object.
 *
 * @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() 
}
 
Example 14
/**
 * Restores a serialized object.
 *
 * @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()
}
 
Example 15
/**
 * Restores a serialized object.
 *
 * @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()
}