Wednesday, January 5, 2005 03:21 AM
I want to seralize an object and store it temp. whenever reqd, client request, I want to bring back the exact state it was in..
how do I do that
Re: how do I seralize an object
Wednesday, January 5, 2005 04:59 AM
Wednesday, January 5, 2005 03:38 AM
FileOutputStream fos = new FileOutputStream("t.tmp");ObjectOutputStream oos = new ObjectOutputStream(fos);oos.writeObject( yourObject );oos.close();
FileInputStream fis = new FileInputStream("t.tmp");ObjectInputStream ois = new ObjectInputStream(fis);YourObject obj = (YourObject) ois.readObject();ois.close();