• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

B&S recommendation regarding reading the file

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic