• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MY magic value is 00 00 01 01

 
Eric Kim
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it is different from you guys, right? I am also wondering should I just skip it at all, or do some verification on it to make sure this is a valid file? In fact, even if this bit is verified, it does not mean this .db file is truely a db file needed for the assignment?
 
Satish Avadhanam
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Eric Kim:
I think it is different from you guys, right? I am also wondering should I just skip it at all, or do some verification on it to make sure this is a valid file? In fact, even if this bit is verified, it does not mean this .db file is truely a db file needed for the assignment?

Hi Kim, here is a statement from my specs

4 byte numeric, magic cookie value

I'm not sure of how you are reading it from the file. In general, it should be a numberic number like 300/500 or something like that. If your magic cookie condition is also something like above, then you can try using readInt() method of RandomAccessFile to read the magic cookie.
Good Luck.
 
Eric Kim
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is what my instruction says:
4 byte numeric, magic cookie value. Identifies this as a data file
But when I use a hex editor to open the db file, then it is 00 00 01 01
 
Satish Avadhanam
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eric, I answered this question in your other post. If you have any questions, please ask them.
Good Luck.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic