Closed GoogleCodeExporter closed 9 years ago
Current file format (set meta data is mixed with card data):
title setIsDone totalTime side1title side1text side2title side2text cardIsDone
tip
totalOfDisplayedCards setLastTimeViewed setLastTimeMarkedDone
setMarkedDoneCounter
cardViewedCounter cardMarkedDoneCounter cardLastTimeViewed
cardLastTimeMarkedDone
String boolean int String String String String boolean String int long long int
int
int long long
Original comment by cl3...@gmail.com
on 18 Apr 2008 at 7:29
while creating the new file format the following has to be done:
1 - add a new field 'cardId' to the FlashCard VO
2 - Check if the recordStore being read has the file format version number and
the
number is the same we expect.
3 - If not, we need to upgrade the file format. We read using the old method and
write the store back immediately in the new format.
4 - The store need to be written back immediately since the record size of a
single
card is now larger and saving it to the old store would corrupt data.
5 - This will cause a substantial delay on the first app startup after the
upgrade,
since we will need to read and write the whole store at startup time.
Original comment by cl3...@gmail.com
on 21 Apr 2008 at 6:18
New file format implemented.
Instead of using the 'update a single record' method, I'm creating the whole
store
again, only that now I save all the card data in a single ( 3rd ) record.
This way, the data only needs to be saved on the end, as before.
So:
1st record: File format version (currently 4)
2nd record: Set meta data
3rd record: card data
Original comment by cl3...@gmail.com
on 13 May 2008 at 8:45
Original issue reported on code.google.com by
cl3...@gmail.com
on 18 Apr 2008 at 5:16