I want to get the serialized objects in a file to a vector.( For a library system for an assignment)
But I didn't come across a good way to identify the end of the ObjectInputStream.
What is the condition I must add for the while loop in the following code.
Here is a sample code:
This gives an output like this :
java.io.StreamCorruptedException: invalid type code: AC
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)