aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Assignment on it's way..... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Assignment on it Watch "Assignment on it New topic
Author

Assignment on it's way.....

Saheed Adepoju
Ranch Hand

Joined: Jun 23, 2004
Posts: 267
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


Saheed Adepoju<br />SCJP 1.4<br />SCJD (B&S..In progress)
Jeff Bosch
Ranch Hand

Joined: Jul 30, 2003
Posts: 804
Don't worry about the database format. It's a _very_ simple flat file with some schema info at the start of the file, before the data records.


Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
Alex Matute
Greenhorn

Joined: Jun 28, 2005
Posts: 14
Don't worry about the db format, it took me 1 hour to understand it. However, be aware of the locking stuff, I've been stuck there for 3 days now...
[ July 12, 2005: Message edited by: Alex Matute ]

-------------------<br /> <br />SCJD
Thomas Paul Bigbee
Ranch Hand

Joined: Jun 28, 2005
Posts: 71
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.
Alex Matute
Greenhorn

Joined: Jun 28, 2005
Posts: 14
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.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11460
    
  94

Hi Thomas (and everyone else),
Hi guys, the tricky thing about reading the database is that its using the ReadUTF() method for the names of the fields.
Please remember that there are different assignments out there - a few work well with readUTF, and some cannot use it at all.

Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Assignment on it's way.....