Class IPv4AddressExprUtils

java.lang.Object
org.apache.druid.query.expression.IPv4AddressExprUtils

public class IPv4AddressExprUtils extends Object
  • Constructor Details

    • IPv4AddressExprUtils

      public IPv4AddressExprUtils()
  • Method Details

    • overflowsUnsignedInt

      public static boolean overflowsUnsignedInt(long value)
      Returns:
      True if argument cannot be represented by an unsigned integer (4 bytes), else false
    • parse

      @Nullable public static inet.ipaddr.ipv4.IPv4Address parse(@Nullable String string)
      Returns:
      IPv4 address if the supplied string is a valid dotted-decimal IPv4 Address string.
    • parseString

      @Nullable public static inet.ipaddr.IPAddressString parseString(@Nullable String string)
    • parse

      @Nullable public static inet.ipaddr.ipv4.IPv4Address parse(long value)
      Returns:
      IPv4 address if the supplied integer is a valid IPv4 integer number.
    • toString

      public static String toString(inet.ipaddr.ipv4.IPv4Address address)
      Returns:
      IPv4 address dotted-decimal canonical string.
    • toLong

      public static long toLong(inet.ipaddr.ipv4.IPv4Address address)
      Returns:
      IPv4 address as an integer.