Class InetUtils


  • public class InetUtils
    extends Object
    Utility class for internet-related stuff.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • InetUtils

        public InetUtils()
    • Method Detail

      • hasConnection

        public static boolean hasConnection​(String host,
                                            int timeout)
        Checks whether a connection is available to the specified host.
        Parameters:
        host - the host to ping
        timeout - the timeout in milli-seconds
        Returns:
        true if successfully pinged