Hi Che, I have the same project and have the same sort of questions.I am also waiting for somebody to reply to your email. I bought the Scjd book written by Andrew Monkhouse. I am also wondering how to see what data is in the db file?.
Originally posted by Chih-Wei Lee: The reason I don't want to let Data.java access db file directly is I prefer there is a class like BSDataBase.java to represent db file and provide every utility method about data access.
The role of Data.java is just to organize these methods and control locking issue. So Data.java can follow DB.java and won't be mess up.
Is this a good idea?
I did not do that personally, but I think it's a good idea. I had myself 2 helper class used exclusively by Data. The only constraint is to have Data implementing the Interface.The rest, should be based purely on good design and meeting requirements (simple, no performance consideration needed, easy to understand...).
Originally posted by Mattman: I am also wondering how to see what data is in the db file?.
the db file is text file, you can open it with Notepad. Its exact structure is detailed in your instructions.html.
The file start with an header (couple hundred characters) providing details on the records structure (same details as in your instructions). Just refer to your instructions for the exact length and position of each field.
Regards, Alex [ February 24, 2008: Message edited by: Alex Belisle Turcot ]
Concerning your 2nd question (being able to view binary file), you can use a free binary hex editor such as "Free Hex Editor Neo" to view the file. It will display the hexadecimal bytes and its corresponding characters.
Joined: Feb 20, 2008
Thanks for every response. However, I saw the instruction said: The data access file "must" be called Data.java. Does this mean I can only use Data.java to read and write DB file?
Alex Belisle Turcot
Joined: Apr 26, 2005
Originally posted by Chih-Wei Lee: Thanks for every response. However, I saw the instruction said: The data access file "must" be called Data.java. Does this mean I can only use Data.java to read and write DB file?
No, in my opinion, it rather means that the class which will implements the interface must be called Data.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com