程序包 net.risesoft.id

类 Y9IpUtil


  • public class Y9IpUtil
    extends Object
    • 构造器详细资料

      • Y9IpUtil

        public Y9IpUtil()
    • 方法详细资料

      • getIp

        public static String getIp()
      • getHostAddress

        public static List<String> getHostAddress​(String interfaceName)
                                           throws SocketException
        获取已激活网卡的IP地址
        参数:
        interfaceName - 可指定网卡名称,null则获取全部
        返回:
        List<String> 已激活网卡的IP地址
        抛出:
        SocketException - Thrown to indicate that there is an error creating or accessing a Socket.