ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("file"));
oos.writeObject(hashtable);
oos.close();