-
Enhancement
-
Resolution: Duplicate
-
P5
-
None
-
1.0.2, 1.1.7, 1.2.0
-
generic, sparc
-
generic, solaris_2.4
If you want to write an InetAddress to a stream there is a convenient 'getAddress'
method which returns an array of bytes representing the address. But when you
want to read in this array of bytes and convert it back to an InetAddress there is
no way to do it.
You could write the InetAddress out as a string and then use 'getByName' when
you read back the string, but that involves reading and writing more, because
the string is not as compact as a byte array.
A static method for constructing an InetAddress from an array of bytes would
be very handy.
method which returns an array of bytes representing the address. But when you
want to read in this array of bytes and convert it back to an InetAddress there is
no way to do it.
You could write the InetAddress out as a string and then use 'getByName' when
you read back the string, but that involves reading and writing more, because
the string is not as compact as a byte array.
A static method for constructing an InetAddress from an array of bytes would
be very handy.
- duplicates
-
JDK-4072524 extracting InetAddress when IP(byte address) is provided.
- Closed