I downloaded the assignment db-2x3.db. When I check the contents in the ultraedit editor. I found the first 6 characters are contains only ...... c haracters.
But In my assignment says
Start of file 4 byte numeric, magic cookie value. Identifies this as a data file 2 byte numeric, number of fields in each record
Schema description section. Repeated for each field in a record: 1 byte numeric, length in bytes of field name n bytes (defined by previous entry), field name 1 byte numeric, field length in bytes end of repeating block
Data section. Repeat to end of file: 1 byte flag. 00 implies valid record, 0xFF implies deleted record Record containing fields in order specified in schema section, no separators between fields, each field fixed length at maximum specified in schema information
End of file
I didn't find the magic cookie value in the file.
Any ideas how to verify the file format is correct?
I read mine in a hex editor and it displayed as listed in the schema. Perhaps the editor you have was set to display a period (.) for a non-print character? It's also easy in Java to write a simple GUI to display in hex.
Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
Set ultraedit to display in hex and you will be able to read it just fine. I had the same version as you, and didn't have any problems.
“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook