Code example for ObjectInputStream

Methods: defaultReadObject, readObject

0
     * @param in the input stream 
     * @throws IOException 
     * @throws ClassNotFoundException 
     */ 
    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
        in.defaultReadObject();
        collection = (Collection<E>) in.readObject();
    } 
 
}