1 16 package org.apache.commons.collections.list; 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.List ; 24 25 31 public abstract class AbstractSerializableListDecorator 32 extends AbstractListDecorator 33 implements Serializable { 34 35 36 private static final long serialVersionUID = 2684959196747496299L; 37 38 41 protected AbstractSerializableListDecorator(List list) { 42 super(list); 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 |