public final class IPv6Address extends Object implements Comparable<IPv6Address>
Constructor and Description |
---|
IPv6Address(long highBits,
long lowBits) |
Modifier and Type | Method and Description |
---|---|
IPv6Address |
add(int value)
Addition.
|
int |
compareTo(IPv6Address that) |
boolean |
equals(Object o) |
static IPv6Address |
fromInetAddress(InetAddress inetAddress)
Create an IPv6 address from a java.net.Inet6Address.
|
static IPv6Address |
fromString(String string)
Create an IPv6 address from its String representation.
|
long |
getHighBits() |
long |
getLowBits() |
int |
hashCode() |
IPv6Address |
maskWithNetworkMask(IPv6NetworkMask networkMask)
Mask the address with the given network mask.
|
IPv6Address |
maximumAddressWithNetworkMask(IPv6NetworkMask networkMask)
Calculate the maximum address with the given network mask.
|
int |
numberOfLeadingOnes() |
int |
numberOfLeadingZeroes() |
int |
numberOfTrailingOnes() |
int |
numberOfTrailingZeroes() |
IPv6Address |
subtract(int value)
Subtraction.
|
InetAddress |
toInetAddress() |
String |
toLongString() |
short[] |
toShortArray() |
String |
toString() |
public static IPv6Address fromString(String string)
string
- string representationpublic static IPv6Address fromInetAddress(InetAddress inetAddress)
inetAddress
- Inet6Address representationpublic InetAddress toInetAddress() throws UnknownHostException
UnknownHostException
public IPv6Address add(int value)
value
- value to addpublic IPv6Address subtract(int value)
value
- value to substractpublic IPv6Address maskWithNetworkMask(IPv6NetworkMask networkMask)
networkMask
- network maskpublic IPv6Address maximumAddressWithNetworkMask(IPv6NetworkMask networkMask)
networkMask
- network maskpublic String toString()
public String toLongString()
public short[] toShortArray()
public int compareTo(IPv6Address that)
compareTo
in interface Comparable<IPv6Address>
public long getHighBits()
public long getLowBits()
public int numberOfTrailingZeroes()
public int numberOfTrailingOnes()
public int numberOfLeadingZeroes()
public int numberOfLeadingOnes()
Copyright © 2012. All Rights Reserved.