Package org.eblocker.server.common.util
Class Ip6Utils
java.lang.Object
org.eblocker.server.common.util.Ip6Utils
Utility functions for IPv6 addresses.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Ip6Addresscombine(Ip6Address networkAddress, Ip6Address hostAddress) static Ip6AddressgetHostAddress(Ip6Address address, int prefixLength) static Ip6AddressgetNetworkAddress(Ip6Address address, int prefixLength) static booleanisInNetwork(Ip6Address hostAddress, Ip6Address networkAddress, int prefixLength) static booleanisIp6Address(String address) static booleanisIp6Range(String ipRange) static booleanisLinkLocal(Ip6Address address) static booleanisUniqueLocal(Ip6Address address) static StringstripBrackets(String address) Strips enclosing brackets from IPv6 addresses
-
Constructor Details
-
Ip6Utils
public Ip6Utils()
-
-
Method Details
-
isIp6Address
-
isIp6Range
-
combine
-
isInNetwork
public static boolean isInNetwork(Ip6Address hostAddress, Ip6Address networkAddress, int prefixLength) -
getNetworkAddress
-
getHostAddress
-
isLinkLocal
-
isUniqueLocal
-
stripBrackets
Strips enclosing brackets from IPv6 addresses- Parameters:
address- address with optional brackets e.g. [::1]- Returns:
- address with brackets removed, e.g. ::1. There is no guarantee that the returned string is a valid IPv6 address.
-