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();
    } 
 
    //----------------------------------------------------------------------- 
    /** 
     * Constructor that wraps (not copies). 
     * 
     * @param set the set to decorate, must not be null 
     * @throws IllegalArgumentException if set is null 
     */ 
    private UnmodifiableSortedSet(SortedSet<E> set) {
        super(set);
    } 
 
    //-----------------------------------------------------------------------