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

The following examples show how to use java.io.ObjectInputStream#registerValidation() . 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 File: DataEditorSupport.java    From netbeans with 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
Source File: ServerStartTask.java    From wildfly-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
    ois.defaultReadObject();
    ois.registerValidation(this, 100);
}
 
Example 3
Source File: AbstractDataset.java    From openstock with GNU General Public License v3.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 4
Source File: AbstractDataset.java    From ccu-historian with GNU General Public License v3.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 5
Source File: AbstractDataset.java    From SIMVA-SoS with 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 File: Cardumen_001_s.java    From coming with 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 File: Cardumen_001_t.java    From coming with 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 File: JGenProg2017_001_s.java    From coming with 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 File: JGenProg2017_001_t.java    From coming with 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
Source File: AbstractDataset.java    From ECG-Viewer with GNU General Public License v2.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 11
Source File: AbstractDataset.java    From astor with GNU General Public License v2.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 12
Source File: AbstractDataset.java    From astor with GNU General Public License v2.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 13
Source File: AbstractDataset.java    From opensim-gui with 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
Source File: AbstractDataset.java    From buffer_bci with GNU General Public License v3.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 15
Source File: AbstractDataset.java    From buffer_bci with GNU General Public License v3.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()
}