Top Description Constructors Methods
org.bouncycastle.util

public Class IPAddress

extends Object
Class Inheritance

Utility methods for processing String objects containing IP addresses.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static boolean
isParseable(String s, int pos, int end, int radix, int maxLength, boolean allowLeadingZero, int minValue, int maxValue)

private static boolean
private static boolean
isParseableIPv4Octet(String s, int pos, int end)

private static boolean
private static boolean
isParseableIPv6Segment(String s, int pos, int end)

public static boolean

Returns:

true if a valid address, false otherwise
isValid
(String
the IP address as a String.
address
)

Validate the given IPv4 or IPv6 address.

public static boolean

Returns:

true if a valid IPv4 address, false otherwise
isValidIPv4
(String
the IP address as a String.
address
)

Validate the given IPv4 address.

public static boolean
public static boolean

Returns:

true if a valid IPv6 address, false otherwise
isValidIPv6
(String
the IP address as a String.
address
)

Validate the given IPv6 address.

public static boolean
public static boolean

Returns:

true if a valid address with netmask, false otherwise
isValidWithNetMask
(String
the IP address as a String.
address
)

Validate the given IPv4 or IPv6 address and netmask.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

IPAddressback to summary
public IPAddress()

Method Detail

isParseableback to summary
private static boolean isParseable(String s, int pos, int end, int radix, int maxLength, boolean allowLeadingZero, int minValue, int maxValue)
isParseableIPv4Maskback to summary
private static boolean isParseableIPv4Mask(String s)
isParseableIPv4Octetback to summary
private static boolean isParseableIPv4Octet(String s, int pos, int end)
isParseableIPv6Maskback to summary
private static boolean isParseableIPv6Mask(String s)
isParseableIPv6Segmentback to summary
private static boolean isParseableIPv6Segment(String s, int pos, int end)
isValidback to summary
public static boolean isValid(String address)

Validate the given IPv4 or IPv6 address.

Parameters
address:String

the IP address as a String.

Returns:boolean

true if a valid address, false otherwise

isValidIPv4back to summary
public static boolean isValidIPv4(String address)

Validate the given IPv4 address.

Parameters
address:String

the IP address as a String.

Returns:boolean

true if a valid IPv4 address, false otherwise

isValidIPv4WithNetmaskback to summary
public static boolean isValidIPv4WithNetmask(String address)
isValidIPv6back to summary
public static boolean isValidIPv6(String address)

Validate the given IPv6 address.

Parameters
address:String

the IP address as a String.

Returns:boolean

true if a valid IPv6 address, false otherwise

isValidIPv6WithNetmaskback to summary
public static boolean isValidIPv6WithNetmask(String address)
isValidWithNetMaskback to summary
public static boolean isValidWithNetMask(String address)

Validate the given IPv4 or IPv6 address and netmask.

Parameters
address:String

the IP address as a String.

Returns:boolean

true if a valid address with netmask, false otherwise