How do you handle the End-Of-File (EOF) condition when reading serialized objects from a file in Java?
By catching the EOFException
EOFException
Using a for loop until no more data is available
for
By checking if the file pointer is null
By using the available() method of InputStream
available()
InputStream