In our project we need to use standard JAVA API 1.4.
We have been using InetAddress.getByNAme(String address) for validating Ipv6/v4 address. Now we are facing problem i.e if DNS configuration is not valid in our network then validation method takes more time to return result.
I have searched google for many alternatives to avoid DNS look up during validation and we have only one option getByAddress()
- Could any of you please suggest me how to convert IpAddress in String to byte array which is required as input parameter for
getByAddress()
method? - Also can you please explain what does
getByAddress()
do to validate address? Does it look up for some local host?