Skip to main content
gamedev.net
๐Ÿ”’ Locked

java objectinputstream doubt...

Started by FreJa Nov 27, 2005 at 10:56 AM 0 replies 500+ views
Original Post
FreJa
FreJa
Hi, Im trying to read objects from a file (serialization). I doing this:

ObjectInputStream in = new ObjectInputStream(new FileInputStream("kjh"));
while(in.available() != 0) {
   Object obj = in.readObject();
   // do stuff
}
the file exists, and has objects in it... however it doesn't enter the while cycle... why? while(in.available() != 0) is correct (while there are objects)? Huge thanks
"Through me the road to the city of desolation,Through me the road to sorrows diuturnal,Through me the road among the lost creation."
danto
danto
I'm not at all familiar with java code, but I searched google and found someone that appears to have a similar problem.

Maybe this will help you out:
http://forum.java.sun.com/thread.jspa?threadID=552993&messageID=2748469
For Gamers and Developershttp://www.nitrousbutterfly.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.