Sun accessor can check our application with any database file ?
or they will check our application with the database file that Sun provided ?
What are the validation for the database file we should do before starting application?
I am doing the following validation for database file before starting application:
1.correct magic cookie
4. should exist
5. should ends with *.db
I know the magic cookie for my database file so I hard code since without reading file how can we know the exact value of magic cookie so I hard coded in constant file . is it okay?
Am I missing some validation for database file ?
Please let me know.
Perhaps too much validation... the magic cookie is itself enough validation. Here is my sequence of file validation I did.
1. GUI allows user to select file from current directory and does a default display of all files that end in .db This means that this application is not tied to files that end with .db but uses .db files as default. File should be readable and writable yes. I hardcode the magic cookie lower down as a validation but as a means of protection (due to this db being share by legacy application) I ALSO ensured that schema matches so that this application ill not create corrupt data for any existing application using the same database.
SCJP 6.0, SCJD (400/400), SCBCD for JEE 5, SCWCD 1.4 I do videos for development at
I am probably the only developer ever to have had an orange sized brain tumor in my brain while learning development!!