Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[Bodgit Scrapper] what's the meaning of magic cookie value?

 
he qinfeng
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone:
At the start of the data file, there is 4 byte numeric, magic cookie value. Identifies this as a data file.
It means that the magic cookie only indicated the file is a data file ,not indicated the location of start of the record ?
Thanks for your answer.
 
Stef Widmer
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
The magic cookie is just a number which identifies your data file as a the right data file. Serveral people have different numbers. I got 512.
Just test for the correct number when you open your file.
Hope that helps.
Stef
 
he qinfeng
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to test the magic value?
my number is 195,is it right?
 
Stef Widmer
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do something like this

[ July 01, 2004: Message edited by: Stef Widmer ]
 
he qinfeng
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you very much
 
Robert Konigsberg
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes thank you. I made the mistake of using assert() and not throw.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic