1 16 package org.apache.commons.collections.collection; 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 24 30 public abstract class AbstractSerializableCollectionDecorator 31 extends AbstractCollectionDecorator 32 implements Serializable { 33 34 35 private static final long serialVersionUID = 6249888059822088500L; 36 37 40 protected AbstractSerializableCollectionDecorator(Collection coll) { 41 super(coll); 42 } 43 44 51 private void writeObject(ObjectOutputStream out) throws IOException { 52 out.defaultWriteObject(); 53 out.writeObject(collection); 54 } 55 56 63 private void readObject(ObjectInputStream in) throws IOException , ClassNotFoundException { 64 in.defaultReadObject(); 65 collection = (Collection ) in.readObject(); 66 } 67 68 } 69 | Popular Tags |