IpAddress.Version
Modifier and Type | Field and Description |
---|---|
static Ip6Address |
ALL_DHCP_RELAY_AGENTS_AND_SERVERS
A link-scoped multicast address used by a DHCP client to communicate with
neighboring DHCP relay agents and servers.
|
static Ip6Address |
ALL_DHCP_SERVERS
A site-scoped multicast address used by a DHCP relay agent to
communicate with DHCP servers.
|
static int |
BIT_LENGTH |
static int |
BYTE_LENGTH |
static IpAddress.Version |
VERSION |
static Ip6Address |
ZERO
All-zero unspecified IPv6 address.
|
INET_BIT_LENGTH, INET_BYTE_LENGTH, INET6_BIT_LENGTH, INET6_BYTE_LENGTH
Modifier and Type | Method and Description |
---|---|
static Ip6Address |
makeMaskedAddress(Ip6Address address,
int prefixLength)
Creates an IPv6 address by masking it with a network mask of given
mask length.
|
static Ip6Address |
makeMaskPrefix(int prefixLength)
Creates an IPv6 network mask prefix.
|
static Ip6Address |
valueOf(byte[] value)
Converts a byte array into an IPv6 address.
|
static Ip6Address |
valueOf(byte[] value,
int offset)
Converts a byte array and a given offset from the beginning of the
array into an IPv6 address.
|
static Ip6Address |
valueOf(java.net.InetAddress inetAddress)
Converts an InetAddress into an IPv6 address.
|
static Ip6Address |
valueOf(java.lang.String value)
Converts an IPv6 string literal (e.g., "1111:2222::8888") into an IP
address.
|
byteLength, compareTo, equals, getIp4Address, getIp6Address, hashCode, isIp4, isIp6, isLinkLocal, isMulticast, isSelfAssigned, isZero, makeMaskedAddress, makeMaskPrefix, toInetAddress, toIpPrefix, toOctets, toString, valueOf, valueOf, valueOf, version
public static final IpAddress.Version VERSION
public static final int BYTE_LENGTH
public static final int BIT_LENGTH
public static final Ip6Address ALL_DHCP_RELAY_AGENTS_AND_SERVERS
public static final Ip6Address ALL_DHCP_SERVERS
public static final Ip6Address ZERO
public static Ip6Address valueOf(byte[] value)
value
- the IPv6 address value stored in network byte order
(i.e., the most significant byte first)java.lang.IllegalArgumentException
- if the argument is invalidpublic static Ip6Address valueOf(byte[] value, int offset)
The IP address is stored in network byte order (i.e., the most significant byte first).
value
- the value to useoffset
- the offset in bytes from the beginning of the byte arrayjava.lang.IllegalArgumentException
- if the arguments are invalidpublic static Ip6Address valueOf(java.net.InetAddress inetAddress)
inetAddress
- the InetAddress value to use. It must contain an IPv6
addressjava.lang.IllegalArgumentException
- if the argument is invalidpublic static Ip6Address valueOf(java.lang.String value)
value
- an IPv6 address value in string formjava.lang.IllegalArgumentException
- if the argument is invalidpublic static Ip6Address makeMaskPrefix(int prefixLength)
prefixLength
- the length of the mask prefix. Must be in the
interval [0, 128]java.lang.IllegalArgumentException
- if the arguments are invalidpublic static Ip6Address makeMaskedAddress(Ip6Address address, int prefixLength)
address
- the address to maskprefixLength
- the length of the mask prefix. Must be in the
interval [0, 128]java.lang.IllegalArgumentException
- if the prefix length is invalid