• Post Reply Bookmark Topic Watch Topic
  • New Topic

Cursor position error  RSS feed

 
nabi bux
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OBJ=(Add) din.readObject();
while(OBJ!=null)
{
System.out.println(OBJ.s1);
System.out.println(OBJ.s1);
OBJ=(Add)din.readObject();
}
when i used the above code ihave got
EOFException how i get end of file
is there an other method
and i have "next"
button how i control the cursor mean
how i get the next or privious record in
the file
thank in advance
 
Joe Ess
Bartender
Posts: 9429
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Serialization is designed to make it easy to persist a single object's state. Any additional functionality is the responsability of the implementor. Streams are one-way as well. You can't go backwards unless you use PushbackInputStream. Maybe a RandomAccessFile would be better for your purpose?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!