This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

MY magic value is 00 00 01 01

 
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?
 
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.
 
I was her plaything! And so was this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic