Package io.anyline.nfc.bouncycastle.util
Class IPAddress
-
- All Implemented Interfaces:
public class IPAddress
Utility methods for processing String objects containing IP addresses.
-
-
Constructor Summary
Constructors Constructor Description IPAddress()
-
Method Summary
Modifier and Type Method Description static boolean
isValid(String address)
Validate the given IPv4 or IPv6 address. static boolean
isValidWithNetMask(String address)
Validate the given IPv4 or IPv6 address and netmask. static boolean
isValidIPv4(String address)
Validate the given IPv4 address. static boolean
isValidIPv4WithNetmask(String address)
static boolean
isValidIPv6WithNetmask(String address)
static boolean
isValidIPv6(String address)
Validate the given IPv6 address. -
-
Method Detail
-
isValid
static boolean isValid(String address)
Validate the given IPv4 or IPv6 address.
- Parameters:
address
- the IP address as a String.- Returns:
true if a valid address, false otherwise
-
isValidWithNetMask
static boolean isValidWithNetMask(String address)
Validate the given IPv4 or IPv6 address and netmask.
- Parameters:
address
- the IP address as a String.- Returns:
true if a valid address with netmask, false otherwise
-
isValidIPv4
static boolean isValidIPv4(String address)
Validate the given IPv4 address.
- Parameters:
address
- the IP address as a String.- Returns:
true if a valid IPv4 address, false otherwise
-
isValidIPv4WithNetmask
static boolean isValidIPv4WithNetmask(String address)
-
isValidIPv6WithNetmask
static boolean isValidIPv6WithNetmask(String address)
-
isValidIPv6
static boolean isValidIPv6(String address)
Validate the given IPv6 address.
- Parameters:
address
- the IP address as a String.- Returns:
true if a valid IPv6 address, false otherwise
-
-
-
-