Hi,
I'm currently writing a JAVA program that reads a MobileDB database (Palm / PocketPC). Each record in the datatase has the following structure:
[tt]header: |0xFF|oxFF|oxFF|0x01|0xFF|0x00|
1st Field: |# of 1st field (2 bytes)|field (0-n Bytes)|0x00|
nth Field: |# of nth field |nth field|0x00|
trailer: |0x00|[/tt]
Since I'm using a RandomAccessFile I can read any number of bytes from the database file. Since I know the records size but not the length of each field in the record, I read the database on a record by record basis in a byte[] array (skipping the record headers and trailers!).
Question: What would be the easiest way for me to extract the fieldnumbers (= short) and fields (= ASCII String) from the byte[] array?
Thanks in advance for your help,
Tom
I'm currently writing a JAVA program that reads a MobileDB database (Palm / PocketPC). Each record in the datatase has the following structure:
[tt]header: |0xFF|oxFF|oxFF|0x01|0xFF|0x00|
1st Field: |# of 1st field (2 bytes)|field (0-n Bytes)|0x00|
nth Field: |# of nth field |nth field|0x00|
trailer: |0x00|[/tt]
Since I'm using a RandomAccessFile I can read any number of bytes from the database file. Since I know the records size but not the length of each field in the record, I read the database on a record by record basis in a byte[] array (skipping the record headers and trailers!).
Question: What would be the easiest way for me to extract the fieldnumbers (= short) and fields (= ASCII String) from the byte[] array?
Thanks in advance for your help,
Tom