Class NetUtils

java.lang.Object
com.bytedesk.core.uid.utils.NetUtils

public abstract class NetUtils extends Object
NetUtils
Author:
yutianbao
  • Field Details

    • localAddress

      public static InetAddress localAddress
      Pre-loaded local address
  • Constructor Details

    • NetUtils

      public NetUtils()
  • Method Details

    • getLocalInetAddress

      public static InetAddress getLocalInetAddress() throws SocketException
      Retrieve the first validated local ip address(the Public and LAN ip addresses are validated).
      Returns:
      the local address
      Throws:
      SocketException - the socket exception
    • getLocalAddressInstance

      public static InetAddress getLocalAddressInstance()
    • getLocalAddress

      public static String getLocalAddress()
      Retrieve local address
      Returns:
      the string local address