Representation of an IPv6 address that works on both the JVM and Scala.js.
- Companion
- object
Value members
Concrete methods
Applies the supplied mask to this address.
Applies the supplied mask to this address.
- Example
scala> ipv6"ff3b::1".masked(ipv6"fff0::") res0: Ipv6Address = ff30::
Computes the last address in the network identified by applying the supplied mask to this address.
Computes the last address in the network identified by applying the supplied mask to this address.
- Example
scala> ipv6"ff3b::1".maskedLast(ipv6"fff0::") res0: Ipv6Address = ff3f:ffff:ffff:ffff:ffff:ffff:ffff:ffff
Gets the IPv6 address after this address, with overflow from ffff:ffff:....:ffff
to ::
.
Gets the IPv6 address after this address, with overflow from ffff:ffff:....:ffff
to ::
.
- Definition Classes
Gets the IPv6 address before this address, with underflow from ::
to ffff:ffff:....:ffff
.
Gets the IPv6 address before this address, with underflow from ::
to ffff:ffff:....:ffff
.
- Definition Classes
Converts this address to a 128-bit unsigned integer.
Converts this address to a 128-bit unsigned integer.
Converts this address to a string of form x:x:x:x:x:x:a.b.c.d
where each x
represents 16-bits and a.b.c.d
is
IPv4 dotted decimal notation. Consecutive 0 x
fields are condensed with ::
.
Converts this address to a string of form x:x:x:x:x:x:a.b.c.d
where each x
represents 16-bits and a.b.c.d
is
IPv4 dotted decimal notation. Consecutive 0 x
fields are condensed with ::
.
For example, the IPv4 address 127.0.0.1
can be converted to a compatible IPv6 address via
Ipv4Address#toCompatV6, which is represented as the string ::7f00:1
and the mixed string ::127.0.0.1
.
Similarly, 127.0.0.1
can be converted to a mapped V6 address via Ipv4Address#toMappedV6, resulting in
::ffff:7f00:1
and the mixed string ::ffff:127.0.0.1
.
This format is described in RFC4291 section 2.2.3.
- Example
scala> ipv6"::7f00:1".toMixedString res0: String = ::127.0.0.1 scala> ipv6"ff3b:1234::ffab:7f00:1".toMixedString res0: String = ff3b:1234::ffab:127.0.0.1
Returns the condensed string representation of the array per RFC5952.
Returns the condensed string representation of the array per RFC5952.
- Definition Classes
- Any
Returns an uncondensed string representation of the array.
Returns an uncondensed string representation of the array.
Inherited methods
Narrows this address to an Ipv4Address if that is the underlying type.
Narrows this address to an Ipv4Address if that is the underlying type.
- Inherited from
- IpAddress
Narrows this address to an Ipv6Address if that is the underlying type.
Narrows this address to an Ipv6Address if that is the underlying type.
- Inherited from
- IpAddress
Converts this address to a multicast address, as long as it is in the multicast address range.
Converts this address to a multicast address, as long as it is in the multicast address range.
- Inherited from
- IpAddress
Converts this address to a source specific multicast address, as long as it is in the source specific multicast address range.
Converts this address to a source specific multicast address, as long as it is in the source specific multicast address range.
- Inherited from
- IpAddress
If this address is an IPv4 mapped IPv6 address, converts to an IPv4 address, otherwise returns this.
If this address is an IPv4 mapped IPv6 address, converts to an IPv4 address, otherwise returns this.
- Inherited from
- IpAddress
Returns true if this address is a V6 address containing a mapped V4 address.
Returns true if this address is a V6 address containing a mapped V4 address.
- Inherited from
- IpAddress
Resolves this host to an ip address using the platform DNS resolver.
Resolves this host to an ip address using the platform DNS resolver.
If the host cannot be resolved, the effect fails with a java.net.UnknownHostException
.
- Inherited from
- HostPlatform
Resolves this host to all ip addresses known to the platform DNS resolver.
Resolves this host to all ip addresses known to the platform DNS resolver.
If the host cannot be resolved, an empty list is returned.
- Inherited from
- HostPlatform
Resolves this host to an ip address using the platform DNS resolver.
Resolves this host to an ip address using the platform DNS resolver.
If the host cannot be resolved, a None
is returned.
- Inherited from
- HostPlatform
Converts this address to a network order byte array of either 4 or 16 bytes.
Converts this address to a network order byte array of either 4 or 16 bytes.
- Inherited from
- IpAddress