类 NetworkUtil


  • public class NetworkUtil
    extends Object
    网络相关工具
    作者:
    zhanglinfeng
    • 构造器详细资料

      • NetworkUtil

        public NetworkUtil()
    • 方法详细资料

      • 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 - 被检测的字符串
        返回:
        是否未知