public class InetAddressUtil extends Object
| Constructor and Description |
|---|
InetAddressUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getInetAddress()
获得本机IP。
|
static boolean |
isValidAddress(InetAddress address) |
public static String getInetAddress()
在超过一块网卡时会有问题,因为这里每次都只是取了第一块网卡绑定的IP地址
public static boolean isValidAddress(InetAddress address)
Copyright © 2020. All rights reserved.