I have got little idea and started getting database but still don't get the full desired result.
The description in the assignment is 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
while I coded as under:
1)I am getting the feilds name but then values are somehow not fine.
2)Is it good to have only feild names first and then actuall values later altogether.
3)I am reading it using in.readInt which gives me cookie value but then I am using in.readByte. just concern that as in file discription it says "2 byte numeric, number of fields in each record " so isn't it htat I should use in.readShort...I tried but that does not work as it it eats up field name (instead of 'name' I can see 'ame' in the output)