• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sample database structure

 
Marcelo Ortega
Ranch Hand
Posts: 528
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can somebody please show me an example of how the db file should look like?
I'm having trouble understanding terms like magic cookie and where the 1 and the 0 should go exactly.

An example of one or two records would be great.

Thanks in advance and best regards,
Marzo.
 
Marcelo Ortega
Ranch Hand
Posts: 528
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I should mention that i am doing the URLyBird 1.2.1 project.

Regards.
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am assuming that by "Magic Cookie" you mean something similar to the identifying code that is on the front of a Java class file. When the JVM reads a class file it reads the first few bytes and looks for a specific pattern which has the hexadecimal value "CAFEBABE". Here is a pseudo program that does that:


If you "run" the above pseudo program on a java class file, say ReadMagic.class, you will get the output "Looks like a class file".

I leave you to fill in the missing details

You can then modify your program to read your database file and print out the "magic cookie" at the front of it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic