I'm looking at an app in java that runs on both 32bit and 64bit systems, and it deals mainly with IP addresses. These IP addresses are kept as integers, and the normal type for this wastes a ton of memory on 64bit platforms (and yes, memory use has already been shown to be an issue here). How do you declare 32bit integral values that stay at 32bits even on x64 architectures?
As I'm a java novice, if there's a built-in type that's already designed to handle IP addresses please feel free to point that out to me ;)