DNS query in JAVA
I am messing around with DNS services in Java - I am specifically trying to lookup all google.com addresses and display them in an array, similar to running a lookup using nslookup: nslookup -q=TXT _netblocks.google.com 8.8.8.8 I am using InetAddress for this but keep on getting exception errors. Since the errors refer to 'Unknown Host' I don't think InetAddress can read TXT records (if I use google.com it works, but that does't show the full IP Range). Below is my code: InetAddress dnsresult[] = InetAddress.getAllByName("_netblocks.google.com"); for (int i=0; i<dnsresult.length; i++) System