Hi, hope you can help me im having a problem with writing objects out to a text file. I have been able to write them but not edit them as it is not recognised when I read it back in.
I know that they are in byte format, but is there a way of writing an object as text then editing it and saving it back as an object easily?
Just to let you know I only want to do this as a preliminary step to integrating the data from the object into a database.
Heres the code im usiing: java.io.ObjectOutputStream out = new java.io.ObjectOutputStream(new java.io.FileOutputStream(file+".txt")); out.writeObject(theQuestions); out.close();
The object is called "theQuestions" its a vector used to hold questions I have created in a UI of different types, e.g. Multi choice, true false etc
thanks a lot in advance to anyone who can help me.....
Thanks. Yeah ive got it transfered to XML to create the test.
But I need to be able to save seperate questions and import them when needed. I thought the best way to do this was to save them to a text file then add them to a database. Then use JDBC to query the database and produce a text file with the questions you want in the test?
I'm thinking about a new battle cry. Maybe "Not in the face! Not in the face!" Any thoughts tiny ad?
a bit of art, as a gift, that will fit in a stocking