Class NetworkUtils

java.lang.Object
io.servicetalk.utils.internal.NetworkUtils

public final class NetworkUtils extends Object
Network-related utilities.

This class borrowed some of its methods from NetUtil class which was part of Netty.

  • Method Details

    • isValidIpV4Address

      public static boolean isValidIpV4Address(CharSequence ip)
      Takes a string and parses it to see if it is a valid IPV4 address.
      Parameters:
      ip - the IP-address to validate
      Returns:
      true, if the string represents an IPV4 address in dotted notation, false otherwise.
    • isValidIpV6Address

      public static boolean isValidIpV6Address(CharSequence ip)
      Takes a string and parses it to see if it is a valid IPV6 address.
      Parameters:
      ip - the IP-address to validate
      Returns:
      true, if the string represents an IPV6 address