Class Ip6Utils

java.lang.Object
org.eblocker.server.common.util.Ip6Utils

public class Ip6Utils extends Object
Utility functions for IPv6 addresses.
  • Constructor Details

    • Ip6Utils

      public Ip6Utils()
  • Method Details

    • isIp6Address

      public static boolean isIp6Address(String address)
    • isIp6Range

      public static boolean isIp6Range(String ipRange)
    • combine

      public static Ip6Address combine(Ip6Address networkAddress, Ip6Address hostAddress)
    • isInNetwork

      public static boolean isInNetwork(Ip6Address hostAddress, Ip6Address networkAddress, int prefixLength)
    • getNetworkAddress

      public static Ip6Address getNetworkAddress(Ip6Address address, int prefixLength)
    • getHostAddress

      public static Ip6Address getHostAddress(Ip6Address address, int prefixLength)
    • isLinkLocal

      public static boolean isLinkLocal(Ip6Address address)
    • isUniqueLocal

      public static boolean isUniqueLocal(Ip6Address address)
    • stripBrackets

      public static String stripBrackets(String address)
      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.