Hi colleagues:
I think I understand my problem now. The "byte[] format" I was referring to means that the database file is organized as follows:
each record (in bytes) has a fixed length. So, it sounds to me that we should treat a record as an array of bytes. (I tested this without any problem. I was able to read the whole file.)
But my misunderstanding came from the way the "DBAccess" interface was described. The author (SUN) gives the signature of the readrecord method as follows:
...
public
String [] readRecord(long recNo) throws RecordNotFoundException;
...
This method intends to read a record from the file...
So, I understood that "recNo" refers here to the data contained in a record (but in a * long * fornat). I discovered, after so much time, my error: the *recNo here stands for the record position in the database file. Correct me if I am wrong, but I think I am right.
Regards,
--ds