Hi all I havent posted in a while just wanted to say i am fine and well!I just completed payment for the SCJD assignment and i am expecting the mail from SUN concerning the assignment! This post is to ask all of you guys about my readiness, i got Max's book in January and i have read it cover to cover about 4 times(ok well not maybe entirely, the chapter on NIO seems so complicated), i have downloaded the sample app and studied it so much that i have implemented a similar project using JDBC and a JTable and used his design pattern entirely! I left out RMI and threading for my sample project, but i was able to fully comprehend the Locking and RMI stuff effectively well. My question is "am i kinda prepared for the exam having read Max's book?" I know it's silly to ask that but after reading Max's book i feel kinda confident though! All i have to do is fully understand the business requirements and the damn Database format that comes with it! I still have some bit of trouble understanding it from postings from fellow SCJD buddies, but i wanna go thru the RandomAccessFile API and then i guess i would be able to tackle the database schema! Whatever happens i will be in touch via postings when i get confused! Pls guys i would need a bit of support! Thanks alot and this is a wonderful family!Luv yah all
Hi guys, the tricky thing about reading the database is that its using the ReadUTF() method for the names of the fields.
Reads in a string that has been encoded using a modified UTF-8 format. The general contract of readUTF is that it reads a representation of a Unicode character string encoded in Java modified UTF-8 format; this string of characters is then returned as a String.
Joined: Jun 28, 2005
Thomas, are you completely sure? Because I read the spec and I don't think I can use the readUTF() method of RandomAccessFile. My instructions say:
Repeated for each field in a record: 1 byte numeric, length in bytes of field name n bytes (defined by previous entry), field name
and according to Sun's JAVA API:
The first two bytes are read, starting from the current file pointer, as if by readUnsignedShort. This value gives the number of following bytes that are in the encoded string, not the length of the resulting string. The following bytes are then interpreted as bytes encoding characters in the UTF-8 format and are converted into characters.
I don't think the UTF format has anything to do with this specific project, please correct me if I'm wrong.