Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

question regarding reading the binary file

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can I hard code the starting point to read the start of data section? database(flatfile).? what is magic cookie value used for? Should I validate it evertime when user picked their file?

thanks
 
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by fei lin:
Can I hard code the starting point to read the start of data section? database(flatfile).? what is magic cookie value used for? Should I validate it evertime when user picked their file?

thanks



Hi,

yes you can choose to hard code the starting point. I've read on the forum that many people did that. Simply mention it in your design choices.
The magic cookie is is meant to be used by your application to "garantee" that the database file is really the one your are expecting.
Imagine if the SUN examiner tries to use a different database with your application. You don't want that to happen, so you use the magic cookie to detect that..

Regards,
Alex
[ February 08, 2008: Message edited by: Alex Belisle Turcot ]
 
fei lin
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks so much, that clears out my confusion.
 
Acetylsalicylic acid is aspirin. This could be handy too:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic