Class HWInfo.Network

  • Enclosing class:
    HWInfo

    public static final class HWInfo.Network
    extends java.lang.Object
    Returns information about the current network.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getExternalIPAddress()
      Returns the External IP Address by connecting to "http://api.ipify.org".
      static java.lang.String getInternalIPAddress()
      Returns the Internal IP Address.
      static boolean isConnectedToInternet()
      Returns status of internet connection.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getInternalIPAddress

        public static java.lang.String getInternalIPAddress()
        Returns the Internal IP Address.
        Returns:
        Internal IP Address as string
      • getExternalIPAddress

        public static java.lang.String getExternalIPAddress()
        Returns the External IP Address by connecting to "http://api.ipify.org".
        Returns:
        External IP address as string
      • isConnectedToInternet

        public static boolean isConnectedToInternet()
        Returns status of internet connection.
        Returns:
        Internet connection status as boolean