Originally posted by Satish Avadhanam:
Hi Marco, to be clear, cookie and fields are still hexadecimal numbers. If you use readInt or readShort methods of RAF you should see the exact values.
Well, because my assignment says explicitly that data uses the format of DataInputStream and DataOutputStream, I used DataInputStream to read the data with the above method. However, I put each byte in a StringBuffer, and then I convert it into a number with the following:
This is possible because the overloaded method append accepts integers. At the end I get a
String that I can parse with the wrapper class.
However, the lengths were correct, as now the application reads all data (31 records), correctly.
The only doubt I've still got is related to the flag. My instructions say that it contain 0 or 1, but on my file I get no value. Shall I assume zero here (this would eventually be documented)?
Cheers,