Please excuse me if i am revealing too much code, but i'd like to know whether it is my code or whether the db file is corrupt.
My db specs are:
The format of data in the database file is as follows:
Start of file
4 byte numeric, magic cookie value. Identifies this as a data file
4 byte numeric, total overall length in bytes of each record
2 byte numeric, number of fields in each record
Schema description section.
Repeated for each field in a record:
2 byte numeric, length in bytes of field name
n bytes (defined by previous entry), field name
2 byte numeric, field length in bytes
end of repeating block
Data section.
Repeat to end of file:
1 byte "deleted" flag. 0 implies valid record, 1 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
My (rough) implementation:
Output:
magicCookie: 257
sizeBytes: 159
numFields: 7
IOException thrown!
All i want to do for now is at least store the field names for futher
testing.
Any ideas?
Thanks in advance,
Marzo.
SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJD, SCEA/OCMJEA
Live life to an interface, not an implementation!