jQuery in Action, 3rd edition
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes DB file -Data section. 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 "DB file -Data section." Watch "DB file -Data section." New topic

DB file -Data section.

James Clinton
Ranch Hand

Joined: Jun 23, 2003
Posts: 190
My assignment states UrlBird.
Data section.
Repeat to end of file:
1 byte "deleted" flag. 0 implies valid record, 1 implies deleted record

When I read the field the byte is BLANK! do I need to set this to 0?

here is my code to read in that 1 byte.


Anton Golovin
Ranch Hand

Joined: Jul 02, 2004
Posts: 476
Hi, James. I used the following code to read in a record:

[ November 11, 2004: Message edited by: Anton Golovin ]

Anton Golovin (anton.golovin@gmail.com) SCJP, SCJD, SCBCD, SCWCD, OCEJWSD, SCEA/OCMJEA [JEE certs from Sun/Oracle]
jiju ka
Ranch Hand

Joined: Oct 12, 2004
Posts: 306
Prior to reading the complete record checking whether the record is already deleted or not is better.

If the flag is not valid you don't have to set it to the right one( if the requirement is not saying so). In my asignment flag can be changed during insert or delete.
James Clinton
Ranch Hand

Joined: Jun 23, 2003
Posts: 190
ASCII-US doesn't work. Are you sure its not US-ASCII ?

I agree. Here's the link: http://aspose.com/file-tools
subject: DB file -Data section.
It's not a secret anymore!