Java InetAddress Check isReachable(NetworkInterface iface, InetAddress address, int timeout)

Here you can find the source of isReachable(NetworkInterface iface, InetAddress address, int timeout)

Description

is Reachable

License

Apache License

Declaration

public static boolean isReachable(NetworkInterface iface, InetAddress address, int timeout) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.IOException;
import java.net.InetAddress;
import java.net.NetworkInterface;

public class Main {
    public static boolean isReachable(NetworkInterface iface, InetAddress address, int timeout) {
        try {/*  w  ww .j  a  va 2s.  co m*/
            return address.isReachable(iface, 0, timeout);
        } catch (IOException e) {
            return false;
        }
    }
}

Related

  1. isPublicIp(InetAddress addr)
  2. isPublicIP4Address(InetAddress localAddress)
  3. isPubliclyRoutable(final InetAddress addrIP)
  4. isReachable(final InetAddress inetAddress, final int timeout)
  5. isReachable(InetAddress address, int port)
  6. isReservedAddr(InetAddress inetAddr)
  7. isServerAlive(InetAddress host, int port)
  8. isServerAlive(InetAddress host, int port)
  9. isSiteLocalAddress(InetAddress i)