Can anybody explain why this would occur?
I am trying to read in all the objects from a file, and I get the first one, then this error gets thrown :confused:
Thanks
:)
Printable View
Can anybody explain why this would occur?
I am trying to read in all the objects from a file, and I get the first one, then this error gets thrown :confused:
Thanks
:)
Just to clarify. Are you talking about serlization or just reading a file?
yeah serialization. I used an ObjectOutputStream wrapped around a FileOutputStream, and the writeObject method to write it to the file, then the ObjectInputStream wrapped around a FileInputStream to read all the objects. But, it gets the first one (all Strings) and then throws that error.
Im not quite sure. I would have to see the code. The explnation
of StreamCorruptedException in the documentation is a bit vague.
Here's the definition the they give:
Signals that the data stream being read by an ObjectInputStream
has been corrupted and does not contain valid serialized data.