Hi,
We have been written a small application that saves our data using ObjectOutputStream. We saved our object with writeObject(palet). Palet is an array of data 'Palet[] palet = new Palet[25]'. We seem to beable to save the data but reading it back we get an Exception error.
Our code for reading it back looks like this:
public void PaletInit() throws IOException, ClassNotFoundException
{
boolean blnTemp = true;
try
{
File data = new File("palet.obj");
ObjectInputStream in = new ObjectInputStream(new FileInputStream(data));
while(blnTemp == true)
{
index = 0;
palet[index] = (Palet) in.readObject();
}
in.close();
}
catch (Exception e)
{
System.out.println("Error during input");
}
}
We currently rewrote our program using binary stream and that works but would like to figure out why we couldn't get the object reading to work.