posted 21 years ago
My directions have:
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 .
----------------------------------------------------------------------------
Two questions regarding this:
1. How do you write 0x8000 to the file to mark an entry as deleted.
What format is this? I have used numerous raf.write() and raf.writeX()
forms but they all produce junk.
2. Also, how do you read this 2 byte flag indicator?
I have read the flag using multiple forms
of raf.read() and raf.readX(), but none of them ouput 00. For example the following outputs 2. So I must not be reading it correctly.
byte[] record = new byte[2];
System.out.println(raf.read(record));