my dog learned polymorphism*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes UrlyBird questions. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "UrlyBird questions." Watch "UrlyBird questions." New topic
Author

UrlyBird questions.

Muthaiah Ramanathan
Ranch Hand

Joined: May 16, 2005
Posts: 102
where do you find the version information about the assignment?

What is the magic number(257) all about? The specification says "Identifies this as a data file ".

Thanks in advance,

Muthaiah.


SCJP 1.6, SCJD, SCWCD, SCBCD.

Be nice to people on the way up cos, you'll need 'em on your way down - From somewhere I can't remember!
Wei-ju Wu
Ranch Hand

Joined: Feb 16, 2005
Posts: 147
The version information of my assignment was in the title (1.1.3)

It is what the specification says: an identifier of the .db file (simply a fixed value). Depending if you find this flag you could decide whether this is a valid .db file.

The specification also says at what position within the file you will find this magic cookie.
[ May 24, 2005: Message edited by: Wei-ju Wu ]

"The UrlyBird catches the certificate. And he's gonna FlyByNight"<br /> <br />SCJP 1.2/5.0, SCJD, SCBCD, SCWCD, SCEA
Muthaiah Ramanathan
Ranch Hand

Joined: May 16, 2005
Posts: 102
Thanks Wei-ju Wu.

That means I got to have the magic number speficfied in the properties file and check that aginst the one in the file is it?

Muthaiah
Wei-ju Wu
Ranch Hand

Joined: Feb 16, 2005
Posts: 147
You can simply specify it as a symbolic constant within your code, since you can not assume that the properties file exists on application start (at least this holds true for suncertify.properties in my assignment).
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11481
    
  94

Hi Muthaiah,

Just to confirm a theory currently in this forum, is your assignment version "1.0.1"?

This would equate to the hex representation of your magic cookie (257).

Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Muthaiah Ramanathan
Ranch Hand

Joined: May 16, 2005
Posts: 102
I have got the version 1.2.1
Frans Janssen
Ranch Hand

Joined: Dec 29, 2004
Posts: 357
My version was 2.3.2 and my cookie was 0x0202 (my database file was called db-2x2.db). The middle number is apparently left out when determining the cookie number and database file name.

Frans.


SCJP 1.4, SCJD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UrlyBird questions.