public class IPv6Address extends IPAddress implements java.lang.Iterable<IPv6Address>
Modifier and Type | Class and Description |
---|---|
static interface |
IPv6Address.IPv6AddressConverter |
IPAddress.IPVersion
Address.SegmentValueProvider
Modifier and Type | Field and Description |
---|---|
static char |
ALTERNATIVE_ZONE_SEPARATOR |
static int |
BIT_COUNT |
static int |
BITS_PER_SEGMENT |
static int |
BYTE_COUNT |
static int |
BYTES_PER_SEGMENT |
static int |
DEFAULT_TEXTUAL_RADIX |
static int |
MAX_VALUE_PER_SEGMENT |
static int |
MIXED_ORIGINAL_SEGMENT_COUNT |
static int |
MIXED_REPLACED_SEGMENT_COUNT |
static java.lang.String |
REVERSE_DNS_SUFFIX |
static java.lang.String |
REVERSE_DNS_SUFFIX_DEPRECATED |
static int |
SEGMENT_COUNT |
static char |
SEGMENT_SEPARATOR |
static char |
UNC_RANGE_SEPARATOR |
static java.lang.String |
UNC_RANGE_SEPARATOR_STR |
static char |
UNC_SEGMENT_SEPARATOR |
static java.lang.String |
UNC_SUFFIX |
static char |
UNC_ZONE_SEPARATOR |
static char |
ZONE_SEPARATOR |
addressConverter, PREFIX_LEN_SEPARATOR
addressComparator, ALTERNATIVE_RANGE_SEPARATOR, ALTERNATIVE_RANGE_SEPARATOR_STR, ALTERNATIVE_SEGMENT_WILDCARD_STR, HEX_PREFIX, OCTAL_PREFIX, RANGE_SEPARATOR, RANGE_SEPARATOR_STR, SEGMENT_SQL_SINGLE_WILDCARD, SEGMENT_SQL_SINGLE_WILDCARD_STR, SEGMENT_SQL_WILDCARD, SEGMENT_SQL_WILDCARD_STR, SEGMENT_WILDCARD, SEGMENT_WILDCARD_STR
Constructor and Description |
---|
IPv6Address(Address.SegmentValueProvider lowerValueProvider,
Address.SegmentValueProvider upperValueProvider)
Constructs an IPv6 address or subnet.
|
IPv6Address(Address.SegmentValueProvider lowerValueProvider,
Address.SegmentValueProvider upperValueProvider,
java.lang.CharSequence zone)
Constructs an IPv6 address.
|
IPv6Address(Address.SegmentValueProvider lowerValueProvider,
Address.SegmentValueProvider upperValueProvider,
java.lang.Integer networkPrefixLength)
Constructs an IPv6 address or subnet.
|
IPv6Address(byte[] bytes)
Constructs an IPv6 address.
|
IPv6Address(byte[] bytes,
java.lang.CharSequence zone)
Constructs an IPv6 address.
|
IPv6Address(byte[] bytes,
java.lang.Integer networkPrefixLength)
Constructs an IPv6 address or subnet.
|
IPv6Address(IPv6Address prefix,
MACAddress eui)
Constructs an IPv6 address from a modified EUI-64 (Extended Unique Identifier) address section and an IPv6 address section network prefix.
|
IPv6Address(IPv6AddressSection section) |
IPv6Address(IPv6AddressSection section,
java.lang.CharSequence zone) |
IPv6Address(IPv6AddressSection section,
MACAddress eui)
Constructs an IPv6 address from a modified EUI-64 (Extended Unique Identifier) address section and an IPv6 address section network prefix.
|
IPv6Address(IPv6AddressSection section,
MACAddressSection eui)
Constructs an IPv6 address from a modified EUI-64 (Extended Unique Identifier) address and an IPv6 address section network prefix.
|
IPv6Address(IPv6AddressSection section,
MACAddressSection eui,
java.lang.CharSequence zone) |
IPv6Address(IPv6AddressSegment[] segments)
Constructs an IPv6 address or subnet.
|
IPv6Address(IPv6AddressSegment[] segments,
java.lang.CharSequence zone)
Constructs an IPv6 address or a set of addresses.
|
IPv6Address(IPv6AddressSegment[] segments,
java.lang.Integer networkPrefixLength)
Constructs an IPv6 address or a set of addresses.
|
Modifier and Type | Method and Description |
---|---|
IPv6Address |
adjustPrefixBySegment(boolean nextSegment)
Increases or decreases prefix length to the next segment boundary.
|
IPv6Address |
adjustPrefixLength(int adjustment)
Increases or decreases prefix length by the given increment.
|
IPv6Address |
applyPrefixLength(int networkPrefixLength)
Applies the given prefix length to create a new address.
|
IPv6Address |
bitwiseOr(IPAddress mask)
Does the bitwise disjunction with this address.
|
IPv6Address |
bitwiseOrNetwork(IPAddress mask,
int networkPrefixLength)
Does the bitwise disjunction with this address.
|
boolean |
contains(IPAddress other) |
static IPv6Address |
from(byte[] bytes,
java.lang.CharSequence zone) |
static IPv6Address |
from(byte[] bytes,
java.lang.Integer prefix,
java.lang.CharSequence zone) |
IPv4Address |
get6to4IPv4Address()
Returns the second and third bytes as an
IPv4Address . |
int |
getBitCount() |
int |
getByteCount()
returns the number of bytes in each of the address components represented by this instance
|
IPv4Address |
getEmbeddedIPv4Address()
Returns the embedded
IPv4Address in the lowest (least-significant) two segments. |
IPv4Address |
getEmbeddedIPv4Address(int byteIndex)
Produces an IPv4 address from any sequence of 4 bytes in this IPv6 address.
|
IPv6AddressSection |
getHostSection()
Generates the host section of the address.
|
IPv6AddressSection |
getHostSection(int networkPrefixLength)
Generates the host section of the address.
|
java.lang.Iterable<IPv6Address> |
getIterable()
Useful for using an instance in a "for-each loop".
|
static IPv6Address |
getLoopback() |
IPv6Address |
getLower()
If this represents an address with ranging values, returns an address representing the lower values of the range.
|
IPv6AddressNetwork |
getNetwork() |
IPv6AddressSection |
getNetworkSection()
Generates the network section of the address if the address is a CIDR prefix, otherwise it generates the entire address as a prefixed address with prefix matching the address bit length.
|
IPv6AddressSection |
getNetworkSection(int networkPrefixLength)
Generates the network section of the address.
|
IPv6AddressSection |
getNetworkSection(int networkPrefixLength,
boolean withPrefixLength)
Generates the network section of the address.
|
IPAddressStringDivisionSeries[] |
getParts(IPAddressSection.IPStringBuilderOptions options)
Returns all the ways of breaking this address down into segments, as selected.
|
IPAddressStringDivisionSeries[] |
getParts(IPv6AddressSection.IPv6StringBuilderOptions options) |
IPv6AddressSection |
getSection()
Returns the address as an address section comprising all segments in the address.
|
IPv6AddressSection |
getSection(int index)
Gets the subsection from the series starting from the given index
|
IPv6AddressSection |
getSection(int index,
int endIndex)
Gets the subsection from the series starting from the given index and ending just before the give endIndex
|
IPv6AddressSegment |
getSegment(int index) |
int |
getSegmentCount() |
IPv6AddressSegment[] |
getSegments() |
static java.lang.String[] |
getStandardLoopbackStrings() |
IPv6Address |
getUpper()
If this represents an address with ranging values, returns an address representing the upper values of the range
If this represents an address with a single value in each segment, returns this.
|
java.lang.String |
getZone() |
int |
hashCode() |
boolean |
hasZone() |
boolean |
is6Over4()
Whether the address is 6over4
|
boolean |
is6To4()
Whether the address is IPv6 to IPv4 relay
|
boolean |
isEUI64() |
boolean |
isIPv4Compatible()
Whether the address is IPv4-compatible
|
boolean |
isIPv4Convertible()
Determines whether this address can be converted to IPv4.
|
boolean |
isIPv4Mapped()
Whether the address is IPv4-mapped
::ffff:x:x/96 indicates IPv6 address mapped to IPv4
|
boolean |
isIPv4Translatable() |
boolean |
isIPv6Convertible()
Determines whether an address can be converted to IPv6, if not IPv6 already.
|
boolean |
isIsatap()
Whether the address is ISATAP
|
boolean |
isLinkLocal() |
boolean |
isLoopback() |
boolean |
isMulticast() |
boolean |
isSameAddress(IPAddress other) |
boolean |
isSiteLocal() |
boolean |
isTeredo()
Whether the address is Teredo
|
boolean |
isUniqueLocal() |
boolean |
isWellKnownIPv4Translatable()
Whether the address has the well-known prefix for IPv4 translatable addresses as in rfc 6052 and 6144
|
java.util.Iterator<IPv6Address> |
iterator()
An address component can represent a single segment, address, or section, or it can represent multiple,
typically a subnet or range of segment, address, or section values.
|
IPv6Address |
mask(IPAddress mask)
Applies the given mask to all addresses represented by this IPAddress.
|
IPv6Address |
maskNetwork(IPAddress mask,
int networkPrefixLength)
Applies the given mask up until the given prefix length to all addresses represented by this IPAddress.
|
static IPv6AddressNetwork |
network() |
IPv6Address |
removePrefixLength()
Removes the prefix.
|
IPv6Address |
removePrefixLength(boolean zeroed) |
IPv6Address |
removeZone() |
IPv6Address |
reverseBits(boolean perByte)
Returns a new IPAddress which has the bits reversed.
|
IPv6Address |
reverseBytes()
Returns a new segment series with the bytes reversed.
|
IPv6Address |
reverseBytesPerSegment()
Returns a new segment series with the bytes reversed within each segment.
|
IPv6Address |
reverseSegments()
Returns a new segment series with the segments reversed.
|
java.util.Iterator<IPv6AddressSegment[]> |
segmentsIterator() |
IPv6Address |
setPrefixLength(int prefixLength)
Sets the prefix length.
|
IPv6Address |
setPrefixLength(int prefixLength,
boolean zeroed) |
IPv6Address[] |
subtract(IPAddress other)
Subtract the give subnet from this subnet, returning an array of subnets for the result (the subnets will not be contiguous so an array is required).
|
IPAddressPartStringCollection |
toAllStringCollection() |
java.lang.String |
toBase85String()
The base 85 string is described by RFC 1924
|
java.lang.String |
toBinaryString()
Writes this address as a single binary value with always the exact same number of characters
If this section represents a range of values outside of the network prefix length, then this is printed as a range of two hex values.
|
java.lang.String |
toCanonicalString()
This produces a canonical string.
|
java.lang.String |
toCanonicalWildcardString()
This produces a string similar to the canonical string but avoids the CIDR prefix.
|
java.lang.String |
toCompressedString()
Produce short strings for the address in the usual address format.
|
java.lang.String |
toCompressedWildcardString()
This is similar to toNormalizedWildcardString, avoiding the CIDR prefix, but with compression as well.
|
java.lang.String |
toConvertedString()
Returns a mixed string if it represents a convertible IPv4 address, returns the normalized string otherwise.
|
MACAddress |
toEUI(boolean extended) |
java.lang.String |
toFullString()
This produces a string with no compressed segments and all segments of full length,
which is 4 characters for IPv6 segments and 3 characters for IPv4 segments.
|
java.lang.String |
toHexString(boolean with0xPrefix)
Writes this address as a single hexadecimal value with always the exact same number of characters, with or without a preceding 0x prefix.
|
java.net.Inet6Address |
toInetAddress() |
IPv4Address |
toIPv4()
If this address is IPv4 convertible, returns that address.
|
static IPv6Address |
toIPv4Mapped(IPv4Address addr) |
IPv6Address |
toIPv6() |
IPv4AddressSection |
toMappedIPv4Segments()
::ffff:x:x/96 indicates IPv6 address mapped to IPv4
|
java.lang.String |
toMixedString() |
java.lang.String |
toNormalizedString()
The normalized string returned by this method is consistent with java.net.Inet6address.
|
java.lang.String |
toNormalizedString(boolean keepMixed,
IPv6AddressSection.IPv6StringOptions params)
Constructs a string representing this address according to the given parameters
|
java.lang.String |
toNormalizedString(IPAddressSection.IPStringOptions params)
Constructs a string representing this address according to the given parameters
|
java.lang.String |
toNormalizedString(IPv6AddressSection.IPv6StringOptions params) |
java.lang.String |
toNormalizedWildcardString()
This produces a string similar to the normalized string but avoids the CIDR prefix.
|
java.lang.String |
toOctalString(boolean with0Prefix)
Writes this address as a single octal value with always the exact same number of characters, with or without a preceding 0 prefix.
|
java.lang.String |
toPrefixLengthString()
Returns a string with a CIDR network prefix length if this address has a network prefix length.
|
java.lang.String |
toSQLWildcardString()
This is the same as the string from toNormalizedWildcardString except that
it uses IPAddress.SEGMENT_SQL_WILDCARD instead of IPAddress.SEGMENT_WILDCARD and also uses IPAddress.SEGMENT_SQL_SINGLE_WILDCARD
|
IPAddressPartStringCollection |
toStandardStringCollection() |
IPAddressPartStringCollection |
toStringCollection(IPAddressSection.IPStringBuilderOptions opts) |
IPAddressPartStringCollection |
toStringCollection(IPv6AddressSection.IPv6StringBuilderOptions opts) |
java.lang.String |
toSubnetString()
Produces a consistent subnet string that looks like 1.2.*.* or 1:2::/16
In the case of IPv4, this means that wildcards are used instead of a network prefix when a network prefix has been supplied.
|
java.lang.String |
toUNCHostName()
Generates the Microsoft UNC path component for this address
|
bitCount, bitsPerSegment, byteCount, contains, from, from, from, from, getBitsPerSegment, getBytesPerSegment, getIPVersion, getLocalHost, getLoopback, getMaskPrefixLength, getMatchesSQLClause, getMatchesSQLClause, getMaxSegmentValue, getNetworkPrefixLength, getSegmentStrings, getStandardLoopbackStrings, isAnyLocal, isIPv4, isIPv6, isLocal, isMultipleByNetworkPrefix, matches, maxSegmentValue, network, segmentCount, toAddressString, toAllStrings, toCanonicalHostName, toDelimitedSQLStrs, toHostName, toMinPrefixedEquivalent, toPrefixedEquivalent, toReverseDNSLookupString, toStandardStrings, toStrings
compareTo, equals, getBytes, getBytes, getCount, getDivision, getDivisionCount, getEquivalentPrefix, getMinPrefix, getPrefixLength, getSegments, getSegments, getUpperBytes, getUpperBytes, isFullRange, isMore, isMultiple, isMultipleByPrefix, isPrefixed, isRangeEquivalentToPrefix, isSameAddress, isZero, toString
public static final char SEGMENT_SEPARATOR
public static final char ZONE_SEPARATOR
public static final char ALTERNATIVE_ZONE_SEPARATOR
public static final char UNC_SEGMENT_SEPARATOR
public static final char UNC_ZONE_SEPARATOR
public static final char UNC_RANGE_SEPARATOR
public static final java.lang.String UNC_RANGE_SEPARATOR_STR
public static final java.lang.String UNC_SUFFIX
public static final java.lang.String REVERSE_DNS_SUFFIX
public static final java.lang.String REVERSE_DNS_SUFFIX_DEPRECATED
public static final int BITS_PER_SEGMENT
public static final int BYTES_PER_SEGMENT
public static final int SEGMENT_COUNT
public static final int MIXED_REPLACED_SEGMENT_COUNT
public static final int MIXED_ORIGINAL_SEGMENT_COUNT
public static final int BYTE_COUNT
public static final int BIT_COUNT
public static final int DEFAULT_TEXTUAL_RADIX
public static final int MAX_VALUE_PER_SEGMENT
public IPv6Address(IPv6AddressSegment[] segments)
segments
- the address segmentspublic IPv6Address(IPv6AddressSegment[] segments, java.lang.Integer networkPrefixLength)
segments
- the address segmentsnetworkPrefixLength
- public IPv6Address(IPv6AddressSegment[] segments, java.lang.CharSequence zone)
segments
- the address segmentszone
- the zonepublic IPv6Address(IPv6AddressSection section, java.lang.CharSequence zone)
public IPv6Address(IPv6AddressSection section) throws AddressTypeException
AddressTypeException
public IPv6Address(byte[] bytes, java.lang.CharSequence zone)
bytes
- must be a 16 byte IPv6 addresspublic IPv6Address(byte[] bytes)
bytes
- must be a 16 byte IPv6 addresspublic IPv6Address(byte[] bytes, java.lang.Integer networkPrefixLength)
bytes
- must be a 16 byte IPv6 addressnetworkPrefixLength
- the CIDR prefix, which can be null for no prefix lengthjava.lang.IllegalArgumentException
- if bytes is not length 16public IPv6Address(Address.SegmentValueProvider lowerValueProvider, Address.SegmentValueProvider upperValueProvider, java.lang.Integer networkPrefixLength)
lowerValueProvider
- supplies the 2 byte lower values for each segmentupperValueProvider
- supplies the 2 byte upper values for each segmentnetworkPrefixLength
- the CIDR network prefix length, which can be null for no prefixpublic IPv6Address(Address.SegmentValueProvider lowerValueProvider, Address.SegmentValueProvider upperValueProvider)
lowerValueProvider
- supplies the 2 byte lower values for each segmentupperValueProvider
- supplies the 2 byte upper values for each segmentpublic IPv6Address(Address.SegmentValueProvider lowerValueProvider, Address.SegmentValueProvider upperValueProvider, java.lang.CharSequence zone)
lowerValueProvider
- supplies the 2 byte lower values for each segmentupperValueProvider
- supplies the 2 byte upper values for each segmentpublic IPv6Address(IPv6Address prefix, MACAddress eui)
section
- eui
- public IPv6Address(IPv6AddressSection section, MACAddress eui)
section
- eui
- public IPv6Address(IPv6AddressSection section, MACAddressSection eui)
section
- eui
- public IPv6Address(IPv6AddressSection section, MACAddressSection eui, java.lang.CharSequence zone)
public static IPv6AddressNetwork network()
public IPv6AddressNetwork getNetwork()
getNetwork
in class IPAddress
public static IPv6Address getLoopback()
public static java.lang.String[] getStandardLoopbackStrings()
public IPv6AddressSection getSection()
IPAddress
getSection
in class IPAddress
public IPv6AddressSection getSection(int index)
AddressSegmentSeries
getSection
in interface AddressSegmentSeries
getSection
in class IPAddress
public IPv6AddressSection getSection(int index, int endIndex)
AddressSegmentSeries
getSection
in interface AddressSegmentSeries
getSection
in class IPAddress
public IPv6AddressSegment getSegment(int index)
getSegment
in interface AddressSegmentSeries
getSegment
in class IPAddress
public IPv6AddressSegment[] getSegments()
getSegments
in interface AddressSegmentSeries
getSegments
in class IPAddress
public boolean isEUI64()
public MACAddress toEUI(boolean extended)
public IPAddressStringDivisionSeries[] getParts(IPAddressSection.IPStringBuilderOptions options)
IPAddress
public IPAddressStringDivisionSeries[] getParts(IPv6AddressSection.IPv6StringBuilderOptions options)
public int getSegmentCount()
getSegmentCount
in interface AddressSegmentSeries
getSegmentCount
in class Address
public int getByteCount()
AddressComponent
getByteCount
in interface AddressComponent
getByteCount
in class IPAddress
public int getBitCount()
getBitCount
in interface AddressItem
getBitCount
in class Address
public IPv6Address getLower()
IPAddress
getLower
in interface AddressComponent
getLower
in interface AddressSegmentSeries
getLower
in class IPAddress
public IPv6Address getUpper()
IPAddress
getUpper
in interface AddressComponent
getUpper
in interface AddressSegmentSeries
getUpper
in class IPAddress
public IPv6Address reverseBits(boolean perByte)
IPAddress
reverseBits
in interface AddressComponent
reverseBits
in interface AddressSegmentSeries
reverseBits
in class IPAddress
perByte
- if true, only the bits in each byte are reversed, if false, then all bits in the address are reversedpublic IPv6Address reverseBytes()
AddressSegmentSeries
reverseBytes
in interface AddressComponent
reverseBytes
in interface AddressSegmentSeries
reverseBytes
in class IPAddress
public IPv6Address reverseBytesPerSegment()
AddressSegmentSeries
reverseBytesPerSegment
in interface AddressSegmentSeries
reverseBytesPerSegment
in class IPAddress
public IPv6Address reverseSegments()
AddressSegmentSeries
reverseSegments
in interface AddressSegmentSeries
reverseSegments
in class IPAddress
public java.util.Iterator<IPv6Address> iterator()
AddressComponent
AddressItem.isMultiple()
to determine if this instance represents multiple.
This method iterates through the individual elements.iterator
in interface AddressComponent
iterator
in interface AddressSegmentSeries
iterator
in interface java.lang.Iterable<IPv6Address>
iterator
in class IPAddress
public java.lang.Iterable<IPv6Address> getIterable()
AddressComponent
AddressComponent.iterator()
directly.getIterable
in interface AddressComponent
getIterable
in interface AddressSegmentSeries
getIterable
in class IPAddress
public static IPv6Address from(byte[] bytes, java.lang.Integer prefix, java.lang.CharSequence zone)
public static IPv6Address from(byte[] bytes, java.lang.CharSequence zone)
public IPv4Address toIPv4()
isIPv4Convertible()
to determine convertibility, and that uses an instance of IPAddressConverter.DefaultAddressConverter
which uses IPv4-mapped address mappings from rfc 4038.
Override this method and isIPv4Convertible()
if you wish to map IPv6 to IPv4 according to the mappings defined by
in isIPv4Compatible()
, isIPv4Mapped()
, is6To4()
or by some other mapping.
For the reverse mapping, see IPv4Address.toIPv6()
toIPv4
in class IPAddress
IPAddress.isIPv4Convertible()
public IPv6Address toIPv6()
toIPv6
in class IPAddress
IPv6Address
. Otherwise, returns null.public boolean isIPv4Convertible()
toIPv4()
to match the conversion.isIPv4Convertible
in class IPAddress
public boolean isIPv6Convertible()
IPAddress
IPAddress.toIPv6()
to match the conversion.
This method returns true for all IPv6 addresses.isIPv6Convertible
in class IPAddress
public static IPv6Address toIPv4Mapped(IPv4Address addr) throws AddressTypeException
addr
- AddressTypeException
- if the IPv4 address segments cannot be converted to IPv6 segments because of one or more incompatible segment ranges.public IPv4AddressSection toMappedIPv4Segments()
public IPv4Address get6to4IPv4Address()
IPv4Address
.
This can be used for IPv4 or for IPv6 6to4 addresses convertible to IPv4.public IPv4Address getEmbeddedIPv4Address()
IPv4Address
in the lowest (least-significant) two segments.
This is used by IPv4-mapped, IPv4-compatible, ISATAP addresses and 6over4 addressesIPv4Address
public IPv4Address getEmbeddedIPv4Address(int byteIndex)
byteIndex
- the byte index to startjava.lang.IndexOutOfBoundsException
- if the index is less than zero or bigger than 7public boolean isLinkLocal()
isLinkLocal
in class IPAddress
InetAddress.isLinkLocalAddress()
public boolean isSiteLocal()
isSiteLocal
in class IPAddress
InetAddress.isSiteLocalAddress()
public boolean isUniqueLocal()
public boolean isIPv4Mapped()
public boolean isIPv4Compatible()
Inet6Address.isIPv4CompatibleAddress()
public boolean is6To4()
get6to4IPv4Address()
public boolean is6Over4()
public boolean isTeredo()
public boolean isIsatap()
public boolean isIPv4Translatable()
public boolean isWellKnownIPv4Translatable()
public boolean isMulticast()
isMulticast
in class Address
InetAddress.isMulticastAddress()
public boolean isLoopback()
isLoopback
in class IPAddress
InetAddress.isLoopbackAddress()
public IPv6Address[] subtract(IPAddress other)
IPAddress
public IPv6Address adjustPrefixBySegment(boolean nextSegment)
AddressSegmentSeries
adjustPrefixBySegment
in interface AddressSegmentSeries
adjustPrefixBySegment
in class IPAddress
public IPv6Address adjustPrefixLength(int adjustment)
AddressSegmentSeries
adjustPrefixLength
in interface AddressSegmentSeries
adjustPrefixLength
in class IPAddress
public IPv6Address setPrefixLength(int prefixLength)
AddressSegmentSeries
setPrefixLength
in interface AddressSegmentSeries
setPrefixLength
in class IPAddress
public IPv6Address setPrefixLength(int prefixLength, boolean zeroed)
setPrefixLength
in class IPAddress
public IPv6Address applyPrefixLength(int networkPrefixLength) throws AddressTypeException
IPAddress
applyPrefixLength
in interface AddressSegmentSeries
applyPrefixLength
in class IPAddress
AddressTypeException
public IPv6Address removePrefixLength()
AddressSegmentSeries
removePrefixLength
in interface AddressSegmentSeries
removePrefixLength
in class IPAddress
public IPv6Address removePrefixLength(boolean zeroed)
removePrefixLength
in class IPAddress
public IPv6Address mask(IPAddress mask) throws AddressTypeException
IPAddress
AddressTypeException
is thrown.mask
in class IPAddress
AddressTypeException
public IPv6Address maskNetwork(IPAddress mask, int networkPrefixLength) throws AddressTypeException
IPAddress
AddressTypeException
is thrown.maskNetwork
in class IPAddress
AddressTypeException
public IPv6Address bitwiseOr(IPAddress mask) throws AddressTypeException
IPAddress
bitwiseOr
in class IPAddress
AddressTypeException
public IPv6Address bitwiseOrNetwork(IPAddress mask, int networkPrefixLength) throws AddressTypeException
IPAddress
bitwiseOrNetwork
in class IPAddress
networkPrefixLength
- the new prefix length for the addressAddressTypeException
public IPv6AddressSection getNetworkSection(int networkPrefixLength)
IPAddress
getNetworkSection
in class IPAddress
public IPv6AddressSection getNetworkSection(int networkPrefixLength, boolean withPrefixLength)
IPAddress
getNetworkSection
in class IPAddress
withPrefixLength
- whether the resulting section will have networkPrefixLength as the associated prefix length or notpublic IPv6AddressSection getNetworkSection()
IPAddress
getNetworkSection
in class IPAddress
public IPv6AddressSection getHostSection(int networkPrefixLength)
IPAddress
getHostSection
in class IPAddress
public IPv6AddressSection getHostSection()
IPAddress
getHostSection
in class IPAddress
public boolean hasZone()
public java.lang.String getZone()
public IPv6Address removeZone()
public java.net.Inet6Address toInetAddress()
toInetAddress
in class IPAddress
public boolean isSameAddress(IPAddress other)
isSameAddress
in class IPAddress
public boolean contains(IPAddress other)
public java.lang.String toMixedString()
public java.lang.String toCanonicalString()
toCanonicalString
in interface AddressSegmentSeries
toCanonicalString
in class Address
public java.lang.String toFullString()
IPAddress
toFullString
in class IPAddress
public java.lang.String toNormalizedString()
toNormalizedString
in interface AddressComponent
toNormalizedString
in class Address
public java.lang.String toCompressedString()
Address
toCompressedString
in interface AddressSegmentSeries
toCompressedString
in class Address
public java.lang.String toSubnetString()
IPAddress
toSubnetString
in class IPAddress
public java.lang.String toNormalizedWildcardString()
IPAddress
toNormalizedWildcardString
in class IPAddress
public java.lang.String toBase85String()
public java.lang.String toCanonicalWildcardString()
IPAddress
toCanonicalWildcardString
in class IPAddress
public java.lang.String toCompressedWildcardString()
IPAddress
toCompressedWildcardString
in class IPAddress
public java.lang.String toSQLWildcardString()
IPAddress
toSQLWildcardString
in class IPAddress
public java.lang.String toHexString(boolean with0xPrefix)
Address
toHexString
in interface AddressComponent
toHexString
in class Address
public java.lang.String toBinaryString()
IPAddress
toBinaryString
in class IPAddress
public java.lang.String toOctalString(boolean with0Prefix)
IPAddress
toOctalString
in class IPAddress
public java.lang.String toPrefixLengthString()
IPAddress
toPrefixLengthString
in class IPAddress
public java.lang.String toConvertedString()
IPAddress
toConvertedString
in class IPAddress
public java.lang.String toNormalizedString(IPAddressSection.IPStringOptions params)
IPAddress
toNormalizedString
in class IPAddress
params
- the parameters for the address stringpublic java.lang.String toNormalizedString(IPv6AddressSection.IPv6StringOptions params)
public java.lang.String toNormalizedString(boolean keepMixed, IPv6AddressSection.IPv6StringOptions params)
keepMixed
- if this address was constructed from a string with mixed representation (a:b:c:d:e:f:1.2.3.4), whether to keep it that way (ignored if makeMixed is true in the params argument)params
- the parameters for the address stringpublic java.lang.String toUNCHostName()
IPAddress
toUNCHostName
in class IPAddress
public IPAddressPartStringCollection toStandardStringCollection()
toStandardStringCollection
in class IPAddress
public IPAddressPartStringCollection toAllStringCollection()
toAllStringCollection
in class IPAddress
public IPAddressPartStringCollection toStringCollection(IPAddressSection.IPStringBuilderOptions opts)
toStringCollection
in class IPAddress
public IPAddressPartStringCollection toStringCollection(IPv6AddressSection.IPv6StringBuilderOptions opts)
public java.util.Iterator<IPv6AddressSegment[]> segmentsIterator()
segmentsIterator
in interface AddressSegmentSeries
segmentsIterator
in class IPAddress