Original Post
Hey guys. Im currently writing something to calculate some metrics given a classfile, and am having trouble reading the 4-byte unsigned attribute_count field in one of the structures. How exactly can you go about doing this? The lack of unsigned types in java makes it a bit fiddly. ive been trying int Data1 = Data.readUnsignedInt() ; int Data2 = Data.readUnsignedInt() ; long Final = (Data1 << 16) || (Data2) ; I think this doesn't work because of the high-order bit being interpreted as the sign bit tho. Im not really sure how java stores integer values (2's complement?!) so i dont know where to go from here. any help would be appreciated Scott