Try out the following code: ip[3] = (byte)i; InetAddress address = InetAddress.getByAddress(ip); if (address.isReachable(1000)) { // machine is turned on and can be pinged } else if (!address.getHostAddress().equals(address.getHostName()) { // machine is known in a DNS lookup } else { // the host address and host name are equal, meaning the host name could not be resolved } | 0 |
By: [email protected] On: Tue Nov 19 00:46:52 EST 2013 0 359 0 | 359 |
Are You Satisfied :4Yes3No |