public class IPv6Address extends IPAddress<IPv6Address> implements Writeable
| Modifier and Type | Field and Description |
|---|---|
static IPv6Address |
FULL_MASK |
static IPv6Address |
NO_MASK |
static IPv6Address |
NONE |
static org.projectfloodlight.openflow.types.IPv6Address.Reader |
READER |
| Modifier and Type | Method and Description |
|---|---|
IPv6Address |
and(IPv6Address other)
Perform a low level AND operation on the bits of two IPAddress objects
|
IPv6Address |
applyMask(IPv6Address mask) |
int |
asCidrMaskLength()
If this IPAddress represents a valid CIDR style netmask (see
isCidrMask()) returns the length of the prefix (the number of "1" bits).
|
int |
compareTo(IPv6Address o) |
boolean |
equals(Object obj) |
byte[] |
getBytes()
Returns the raw IP address of this
IPAddress object. |
IPVersion |
getIpVersion()
Returns the Internet Protocol (IP) version of this object
|
int |
getLength() |
int |
getUnsignedShortWord(int i) |
int |
getZeroCompressStart()
get the index of the first word where to apply IPv6 zero compression
|
int |
hashCode() |
boolean |
isBroadcast()
Checks if the IPAddress is the global broadcast address
255.255.255.255 in case of IPv4
|
boolean |
isCidrMask()
Checks if this IPAddress represents a valid CIDR style netmask, i.e.,
it has a set of leading "1" bits followed by only "0" bits
|
boolean |
isMulticast()
IPv6 multicast addresses are defined by the prefix ff00::/8
|
IPv6Address |
not()
Returns a new IPAddress object with the bits inverted
|
static IPv6Address |
of(byte[] address)
Returns an
IPv6Address object that represents the given
IP address. |
static IPv6Address |
of(Inet6Address address)
Returns an
IPv6Address object that represents the given
IP address. |
static IPv6Address |
of(long raw1,
long raw2)
Returns an
IPv6Address object that represents the given
IP address. |
static IPv6Address |
of(String string)
Returns an
IPv6Address object that represents the given
IP address. |
static IPv6Address |
ofCidrMaskLength(int cidrMaskLength)
Returns an
IPv6Address object that represents the
CIDR subnet mask of the given prefix length. |
IPv6Address |
or(IPv6Address other)
Perform a low level OR operation on the bits of two IPAddress objects
|
void |
putTo(com.google.common.hash.PrimitiveSink sink) |
static IPv6Address |
read16Bytes(org.jboss.netty.buffer.ChannelBuffer c) |
String |
toString() |
String |
toString(boolean zeroCompression,
boolean leadingZeros) |
IPv6AddressWithMask |
withMask(IPv6Address mask)
Returns an
IPv6AddressWithMask object that represents this
IP address masked by the given IP address mask. |
IPv6AddressWithMask |
withMaskOfLength(int cidrMaskLength)
Returns an
IPv6AddressWithMask object that represents this
IP address masked by the CIDR subnet mask of the given prefix length. |
void |
write16Bytes(org.jboss.netty.buffer.ChannelBuffer c) |
void |
writeTo(org.jboss.netty.buffer.ChannelBuffer bb) |
fromInetAddress, ofpublic static final IPv6Address NONE
public static final IPv6Address NO_MASK
public static final IPv6Address FULL_MASK
public static final org.projectfloodlight.openflow.types.IPv6Address.Reader READER
public IPVersion getIpVersion()
IPAddressgetIpVersion in class IPAddress<IPv6Address>public boolean isCidrMask()
IPAddressisCidrMask in class IPAddress<IPv6Address>public int asCidrMaskLength()
IPAddressasCidrMaskLength in class IPAddress<IPv6Address>public boolean isBroadcast()
IPAddressisBroadcast in class IPAddress<IPv6Address>public boolean isMulticast()
isMulticast in class IPAddress<IPv6Address>public IPv6Address and(IPv6Address other)
IPAddressand in class IPAddress<IPv6Address>other - IPAddresspublic IPv6Address or(IPv6Address other)
IPAddressor in class IPAddress<IPv6Address>other - IPAddresspublic IPv6Address not()
IPAddressnot in class IPAddress<IPv6Address>@Nonnull public static IPv6Address of(@Nonnull byte[] address)
IPv6Address object that represents the given
IP address. The argument is in network byte order: the highest
order byte of the address is in address[0].
The address byte array must be 16 bytes long (128 bits long).
Similar to InetAddress.getByAddress(byte[]).
address - the raw IP address in network byte orderIPv6Address object that represents the given
raw IP addressNullPointerException - if the given address was nullIllegalArgumentException - if the given address was of an invalid
byte array lengthInetAddress.getByAddress(byte[])@Nonnull public static IPv6Address of(@Nonnull String string) throws IllegalArgumentException
IPv6Address object that represents the given
IP address. The argument is in the conventional string representation
of IPv6 addresses.
Expects up to 8 groups of 16-bit hex words seperated by colons (e.g., 2001:db8:85a3:8d3:1319:8a2e:370:7348).
Supports zero compression (e.g., 2001:db8::7348). Does not currently support embedding a dotted-quad IPv4 address into the IPv6 address (e.g., 2001:db8::192.168.0.1).
string - the IP address in the conventional string representation
of IPv6 addressesIPv6Address object that represents the given
IP addressNullPointerException - if the given string was nullIllegalArgumentException - if the given string was not a valid
IPv6 address@Nonnull public static IPv6Address of(long raw1, long raw2)
IPv6Address object that represents the given
IP address. The arguments are the two 64-bit integers representing
the first (higher-order) and second (lower-order) 64-bit blocks
of the IP address.raw1 - the first (higher-order) 64-bit block of the IP addressraw2 - the second (lower-order) 64-bit block of the IP addressIPv6Address object that represents the given
raw IP address@Nonnull public static IPv6Address of(@Nonnull Inet6Address address)
IPv6Address object that represents the given
IP address. The argument is given as an Inet6Address object.address - the IP address as an Inet6Address objectIPv6Address object that represents the
given IP addressNullPointerException - if the given Inet6Address was
null@Nonnull public static IPv6Address ofCidrMaskLength(int cidrMaskLength)
IPv6Address object that represents the
CIDR subnet mask of the given prefix length.cidrMaskLength - the prefix length of the CIDR subnet mask
(i.e. the number of leading one-bits),
where 0 <= cidrMaskLength <= 128IPv6Address object that represents the
CIDR subnet mask of the given prefix lengthIllegalArgumentException - if the given prefix length was invalid@Nonnull public IPv6AddressWithMask withMask(@Nonnull IPv6Address mask)
IPv6AddressWithMask object that represents this
IP address masked by the given IP address mask.withMask in class IPAddress<IPv6Address>mask - the IPv6Address object that represents the maskIPv6AddressWithMask object that represents this
IP address masked by the given maskNullPointerException - if the given mask was null@Nonnull public IPv6AddressWithMask withMaskOfLength(int cidrMaskLength)
IPv6AddressWithMask object that represents this
IP address masked by the CIDR subnet mask of the given prefix length.withMaskOfLength in class IPAddress<IPv6Address>cidrMaskLength - the prefix length of the CIDR subnet mask
(i.e. the number of leading one-bits),
where 0 <= cidrMaskLength <= 128IPv6AddressWithMask object that
represents this IP address masked by the CIDR
subnet mask of the given prefix lengthIllegalArgumentException - if the given prefix length was invalidofCidrMaskLength(int)public byte[] getBytes()
IPAddressIPAddress object. The result
is in network byte order: the highest order byte of the address is in
getBytes()[0].
Similar to InetAddress.getAddress()
getBytes in class IPAddress<IPv6Address>InetAddress.getAddress()public int getLength()
getLength in interface OFValueType<IPv6Address>public String toString()
toString in class IPAddress<IPv6Address>public int getUnsignedShortWord(int i)
public int getZeroCompressStart()
public String toString(boolean zeroCompression, boolean leadingZeros)
public int hashCode()
hashCode in class IPAddress<IPv6Address>public boolean equals(Object obj)
equals in class IPAddress<IPv6Address>public void write16Bytes(org.jboss.netty.buffer.ChannelBuffer c)
public static IPv6Address read16Bytes(org.jboss.netty.buffer.ChannelBuffer c) throws OFParseError
OFParseErrorpublic IPv6Address applyMask(IPv6Address mask)
applyMask in interface OFValueType<IPv6Address>public int compareTo(IPv6Address o)
compareTo in interface Comparable<IPv6Address>public void putTo(com.google.common.hash.PrimitiveSink sink)
putTo in interface PrimitiveSinkableCopyright © 2016. All rights reserved.