Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S recommendation regarding reading the file

 
Lek Olof
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I just want to hear what your recommendation is regarding reading the file.

Are you reading everything, like the byte that says number of fields and fieldnames and all of that or are you hardcoding field names and number of fields in each record?

And what about that magic cookie value? are you just reading it and hardcoding like "if(magicCookieValue = 1234) then the file format is ok, else not ok?

regards
Olof
 
Song Jing Lim
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For me, I read everything and store to DataSchema javabean object which also store RandomFileAccess object.

I just read the magic cookie but never use it... May be can store the value to properties file then compare with the one read from data file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic