The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

Hex to Integer Problem

I am currently trying to create a program that will extract information from an 'index.dat' file used by Internet Explorer to store internet history.
Currently the problem arises when attempting to find the file offsets for various HASH tables within the file (these tables are where the history entries are stored).
The hex values containing these offsets are at known locations within the file, so finding them is not a problem, however when attempting to extract these values my program seems to collapse. After much 'googling' and messing around I think I've identified where the problem lies.
When looking at the file in a hex editor I can see that the hex values of 0x01 and 0x00 are both given the symbol of '.', ultimately meaning my program treats the 0x01 values as 0x00 messing up any calculation I attempt to carry out.
Below is an extract of code to show my calculations to extract the values:

I dont't believe the problem lies in my calculations as they work perfectly for previous values. None of these values however contain 0x01. Possibly lies in the way the file is read?
If anyone could offer any advice as how to get round this, it would be greatly appreciated.