1 16 package org.apache.commons.collections.set; 17 18 import java.io.IOException ; 19 import java.io.ObjectInputStream ; 20 import java.io.ObjectOutputStream ; 21 import java.io.Serializable ; 22 import java.util.Collection ; 23 import java.util.Set ; 24 25 31 public abstract class AbstractSerializableSetDecorator 32 extends AbstractSetDecorator 33 implements Serializable { 34 35 36 private static final long serialVersionUID = 1229469966212206107L; 37 38 41 protected AbstractSerializableSetDecorator(Set set) { 42 super(set); 43 } 44 45 52 private void writeObject(ObjectOutputStream out) throws IOException { 53 out.defaultWriteObject(); 54 out.writeObject(collection); 55 } 56 57 64 private void readObject(ObjectInputStream in) throws IOException , ClassNotFoundException { 65 in.defaultReadObject(); 66 collection = (Collection ) in.readObject(); 67 } 68 69 } 70 | Popular Tags |