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
Joined: Aug 12, 2003
Posts: 697
posted
0
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
Joined: Feb 21, 2004
Posts: 37
posted
0
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
Joined: Aug 12, 2003
Posts: 697
posted
0
Hi Eric, I answered this question in your other post. If you have any questions, please ask them. Good Luck.