Package io.servicetalk.utils.internal
Class NetworkUtils
java.lang.Object
io.servicetalk.utils.internal.NetworkUtils
Network-related utilities.
This class borrowed some of its methods from NetUtil class which was part of Netty.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Takes a string and parses it to see if it is a valid IPV4 address.static boolean
Takes a string and parses it to see if it is a valid IPV6 address.
-
Method Details
-
isValidIpV4Address
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
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
-