1    /*
2    Copyright 2001 by Ralph Hartley
3    This software is licenced under the terms of the
4    Gnu Public Licence
5    */
6    
7    import java.io.*;
8    import java.util.*;
9    
10   public class SavableWeakHashMap extends WeakHashMap implements Serializable {
11   
12     private static final long serialVersionUID = Version.getSUID();
13   
14     private void readObject(java.io.ObjectInputStream stream)
15       throws java.io.IOException,java.lang.ClassNotFoundException {
16       putAll((HashMap)stream.readObject());
17     }
18   
19     private void writeObject(java.io.ObjectOutputStream stream)
20         throws java.io.IOException {
21       stream.writeObject(new HashMap(this));
22   //    (new HashMap(this)).writeObject(stream);
23     }
24   }
25