public class IpUtils extends Object
| Constructor and Description |
|---|
IpUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getHostIp() |
static String |
getHostName() |
static String |
getRealAddressByIp(String ip)
通过IP获取地理位置
|
static boolean |
internalIp(String ip) |
static byte[] |
textToNumericFormatV4(String text)
将IPv4地址转换成字节
|
public static final String IP_URL
public static boolean internalIp(String ip)
public static String getRealAddressByIp(String ip)
ip - public static byte[] textToNumericFormatV4(String text)
text - IPv4地址public static String getHostIp()
public static String getHostName()
Copyright © 2020. All rights reserved.