aspose file tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Another Doubt in URLyBird 1.1.2 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Reply Bookmark "Another Doubt in URLyBird 1.1.2" Watch "Another Doubt in URLyBird 1.1.2" New topic
Author

Another Doubt in URLyBird 1.1.2

rohan tiwari
Ranch Hand

Joined: Sep 13, 2007
Posts: 82
Hello friends,
I have another doubt .
The data section of my file states:

"Data section. (offset into file equal to "offset to start of record zero" value)
Repeat to end of file:
2 byte flag. 00 implies valid record, 0x8000 implies deleted record
Record containing fields in order specified in schema section, no separators between fields, each field fixed length at maximum specified in schema information "

Does this mean that whenever I write a new record I must first write a flag 00 to mark the record as valid.Also does it mean that when I delete a record I must simply write a flag 0x8000.But in that case the record would be in the file and only the flag would change, the file will keep on growing in size.
I think that I am interpreting the entire thing incorrectly.


SCJP 5<br />SCWCD 1.4<br />SCJD 5
Alex Belisle Turcot
Ranch Hand

Joined: Apr 26, 2005
Posts: 516
Hi,

yes, when you add a record, you must flag it as valid, using your 00 flag.
And when you delete a record, you simply overwrite the flag with your deleted flag.

On one hand the database file will grow, on the other hand, according to your "create" method (most probably, but check to be sure), added record should reuse a deleted record.

Regards,
Alex
[ January 13, 2008: Message edited by: Alex Belisle Turcot ]
rohan tiwari
Ranch Hand

Joined: Sep 13, 2007
Posts: 82
Thanks Alex
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Another Doubt in URLyBird 1.1.2
 
Similar Threads
NX: Reading and writting the 2 byte flag indicator
URLBirdy Collections Advice
.db file format problem, help please!!!
NX: Please Help - Writting and Reading 2 byte flag
how to read data from db file