In the InetAddress class there are several methods that retrieve IP addresses. The address is stored in a byte array, 4 bytes for a IP4 address.
How does that work?
I tried using getByAddress() where you pass both the
string and the byte array. Problem is, a byte is a signed value so any attempt to stick a value > 127 in an address bytes draws a compiler error .... loss of precision. When I call getByName() on a known address string, the address that comes back in the byte array WILL print values over 127. Like.....241 shows up as 241.
Why would they have ever used a byte array to hold an 8 bit unsigned value? How is it that the API calls can store numbers > 127 into the byte array but I can't?
I have GOT to be missing something here.... I just don't know what it is.....
Help???