类 NetworkUtil
- java.lang.Object
-
- cn.bbwres.biscuit.utils.NetworkUtil
-
public class NetworkUtil extends Object
网络相关工具- 作者:
- zhanglinfeng
-
-
构造器概要
构造器 构造器 说明 NetworkUtil()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static StringbigIntegerToIpv6(BigInteger bigInteger)将大整数转换成ipv6字符串static StringgetMultistageReverseProxyIp(String ip)从多级反向代理中获得第一个非unknown IP地址static BigIntegeripv6ToBigInteger(String ipv6Str)ipv6转 BigIntegerstatic booleanisUnknown(String checkString)检测给定字符串是否为未知
-
-
-
方法详细资料
-
ipv6ToBigInteger
public static BigInteger ipv6ToBigInteger(String ipv6Str)
ipv6转 BigInteger- 参数:
ipv6Str- ipv6 字符串- 返回:
- BigInteger
-
bigIntegerToIpv6
public static String bigIntegerToIpv6(BigInteger bigInteger)
将大整数转换成ipv6字符串- 参数:
bigInteger- 大整数- 返回:
- IPv6字符串, 如发生异常返回 null
-
getMultistageReverseProxyIp
public static String getMultistageReverseProxyIp(String ip)
从多级反向代理中获得第一个非unknown IP地址- 参数:
ip- 获得的IP地址- 返回:
- 第一个非unknown IP地址
-
isUnknown
public static boolean isUnknown(String checkString)
检测给定字符串是否为未知- 参数:
checkString- 被检测的字符串- 返回:
- 是否未知
-
-