• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RandomAccessFile

 
Rahim Nathwani
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm using RandomAccessFile to read in the DB file however I do not know how to read until EOF using RandomAccessFile.

Any ideas or Suggestions please?
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
API docs?
They have everything you need to know to read and write RandomAccessFile.
 
Luiz Reginaldo Curado
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need to read until EOF. If you know the size of your records then you can use this information to know how many records you can read.

You can use "file.length()" to retrieve the file size.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic