Database file reader (OCMJD forum at Coderanch) (original) (raw)
Howdy y'all, what y'all doin'?!
Guys, here's a simple tool I created that reads the .db file that is sent along with the SCJD assignments we currently have. This will particularly be helpful to people in the beginning of the development, which is when we have lots of doubts, like, "where should I start from", or "I think my .db file is corrupted", etc.
In order to correctly work, it is likely that a few changes will be required, and they should be done according to the database description, which can be found in the instructions.html file. For instance, some databases have 2 bytes storing each record flag; in this case, it would be necessary to change the value of the RECORD_FLAG_BYTES field to 2, as well as the VALID field.
Note that this code only reads the database file, that's why FileInputStream is being used. Also, I'd really really appreciate if you guys could test it and let me know if you run into any issue.