permaculture playing cards*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Field Name and Field Length Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Field Name and Field Length" Watch "Field Name and Field Length" New topic
Author

Field Name and Field Length

John Mhenry
Greenhorn

Joined: Mar 15, 2013
Posts: 9
There are two, two byte sections in the Schema that have every field encapsulated in a 'field name' and a 'field length'.
When I look at 'Denny's Dvd' source it appears like these are not referenced anywhere.

Denny's Dvd class has a final 'RECORD_LENGTH' which has no 'field name' or 'field length' separators.
Is Denny's DVD database completely different than the test?
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5126
    
  12

There are difference between the database of Denny's DVD and the one used in the actual assignment. There are even differences in database schema and interface methods between the different versions of an assignment.


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 721
John Mhenry wrote:There are two, two byte sections in the Schema that have every field encapsulated in a 'field name' and a 'field length'.
When I look at 'Denny's Dvd' source it appears like these are not referenced anywhere.

Denny's Dvd class has a final 'RECORD_LENGTH' which has no 'field name' or 'field length' separators.
Is Denny's DVD database completely different than the test?


Denny's Dvd records start from location 0 in the database file.
But in my assignment , the first 70 bytes are for the meta data:
4 bytes for magic cookie (location 0-3)
4 bytes for offset (location 4-7)
4 bytes for number of fields
2 bytes for field length
4 bytes for name
4 bytes for location .....

The record starts from location 70.
Try to read your database file from location 0 and see what it prints out.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Field Name and Field Length
 
Similar Threads
Network Client
source code of Denny'dvd app not found for j2se5
urly bird
Max. Denny's DVD Project: DVDDatabase class doubt
few Qs on serialVersionUID