I have implemented the Data class to read and write to the DB file. According to the assignment ("all fields ..., null terminated if less than the maximum length for the field") I have used the "0x00" value for the bytes to fill a field value.
Now I have noticed a difference to the originally provided db file: There the ASCII "blank" character with the byte value 0x20 had been used to fill the fields up their maximum length.
My question: Is it advisable to stick to the original file and therefor to change my implementation to fill the field values with blanks?
It's your choice. If they replace the db file with another file that has the null termination, your application should not choke. But I remember another statement, that you should not alter the database file format also - so you might just want to continue to fill the field values with blanks. Whatever you do, it should be justified in the choices.txt.
If you would search for earlier posts for the same you will find a lot of information.
SCJP 1.6, SCJD, SCWCD, SCBCD.
Be nice to people on the way up cos, you'll need 'em on your way down - From somewhere I can't remember!