This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question regarding reading the binary file

 
fei lin
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • 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
 
Alex Belisle Turcot
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
thanks so much, that clears out my confusion.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic