Package club.zhcs.lina.utils
Class Ips
java.lang.Object
club.zhcs.lina.utils.Ips
- Author:
- Kerbores(kerbores@riemann.tech)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetIP(jakarta.servlet.http.HttpServletRequest request) static StringhostIp()static booleaninternalIp(byte[] addr) static booleaninternalIp(String ip) static longipV4ToLong(String ipv4) static long[]ipv6ToLongs(String ipv6) static booleanstatic Stringlongs2Ipv6(long[] longs) static StringlongToIPV4(long longIp) static byte[]
-
Constructor Details
-
Ips
public Ips()
-
-
Method Details
-
getIP
-
internalIp
-
textToNumericFormatV4
-
internalIp
public static boolean internalIp(byte[] addr) -
hostIp
-
ipV4ToLong
- Parameters:
ipv4-- Returns:
-
longToIPV4
- Parameters:
longIp-- Returns:
-
ipv6ToLongs
- Parameters:
ipv6-- Returns:
-
longs2Ipv6
- Parameters:
longs-- Returns:
-
isInRange
-