@Beta public abstract class AbstractIetfInetUtil<A4,A4NZ extends A4,P4,A6,A6NZ extends A6,P6,A,ANZ,P> extends Object
Modifier | Constructor and Description |
---|---|
protected |
AbstractIetfInetUtil(Class<A4> addr4Class,
Class<A4NZ> addr4nzClass,
Class<P4> prefix4Class,
Class<A6> addr6Class,
Class<A6NZ> addr6nzClass,
Class<P6> prefix6Class) |
Modifier and Type | Method and Description |
---|---|
Inet4Address |
inet4AddressFor(A4 addr) |
Inet4Address |
inet4AddressForNoZone(A4NZ addr) |
Inet6Address |
inet6AddressFor(A6 addr) |
Inet6Address |
inet6AddressForNoZone(A6NZ addr) |
InetAddress |
inetAddressFor(A addr) |
InetAddress |
inetAddressForNoZone(ANZ addr) |
A |
ipAddressFor(byte[] bytes)
Create an IpAddress by interpreting input bytes as an IPv4 or IPv6 address, based on array length.
|
A |
ipAddressFor(InetAddress addr) |
ANZ |
ipAddressNoZoneFor(byte[] bytes)
Create an IpAddress by interpreting input bytes as an IPv4 or IPv6 address, based on array length.
|
ANZ |
ipAddressNoZoneFor(InetAddress addr) |
P |
ipPrefixFor(byte[] bytes,
int mask)
Create an IpPrefix by combining the address with a mask.
|
P |
ipPrefixFor(InetAddress addr,
int mask) |
protected abstract A |
ipv4Address(A4 addr) |
byte[] |
ipv4AddressBytes(A4 addr) |
A4 |
ipv4AddressFor(byte[] bytes)
Create an Ipv4Address by interpreting input bytes as an IPv4 address.
|
A4 |
ipv4AddressFor(InetAddress addr)
Create an Ipv4Address by interpreting an
Inet4Address . |
A4 |
ipv4AddressFrom(P4 prefix) |
protected abstract ANZ |
ipv4AddressNoZone(A4NZ addr) |
byte[] |
ipv4AddressNoZoneBytes(A4NZ addr) |
A4NZ |
ipv4AddressNoZoneFor(byte[] bytes)
Create an Ipv4AddressNoZone by interpreting input bytes as an IPv4 address.
|
A4NZ |
ipv4AddressNoZoneFor(InetAddress addr)
Create an Ipv4AddressNoZone by interpreting an
Inet4Address . |
A4NZ |
ipv4AddressNoZoneFrom(P4 prefix) |
protected abstract String |
ipv4AddressString(A4 addr) |
protected abstract P |
ipv4Prefix(P4 addr) |
P4 |
ipv4PrefixFor(A4 addr) |
P4 |
ipv4PrefixFor(A4 addr,
int mask) |
P4 |
ipv4PrefixFor(byte[] bytes)
Create a /32 Ipv4Prefix by interpreting input bytes as an IPv4 address.
|
P4 |
ipv4PrefixFor(byte[] address,
int mask)
Create a Ipv4Prefix by combining the address with a mask.
|
P4 |
ipv4PrefixFor(InetAddress addr)
Create a /32 Ipv4Prefix for an
Inet4Address |
P4 |
ipv4PrefixFor(InetAddress addr,
int mask)
Create a Ipv4Prefix by combining the address with a mask.
|
P4 |
ipv4PrefixForNoZone(A4NZ addr) |
P4 |
ipv4PrefixForNoZone(A4NZ addr,
int mask) |
P4 |
ipv4PrefixForShort(byte[] address,
int mask) |
P4 |
ipv4PrefixForShort(byte[] array,
int startOffset,
int mask) |
protected abstract String |
ipv4PrefixString(P4 prefix) |
byte[] |
ipv4PrefixToBytes(P4 prefix) |
protected abstract A |
ipv6Address(A6 addr) |
byte[] |
ipv6AddressBytes(A6 addr) |
A6 |
ipv6AddressFor(byte[] bytes)
Create an Ipv6Address by interpreting input bytes as an IPv6 address.
|
A6 |
ipv6AddressFor(InetAddress addr)
Create an Ipv6Address by interpreting an
Inet6Address . |
A6 |
ipv6AddressFrom(P6 prefix) |
protected abstract ANZ |
ipv6AddressNoZone(A6NZ addr) |
byte[] |
ipv6AddressNoZoneBytes(A6NZ addr) |
A6NZ |
ipv6AddressNoZoneFor(byte[] bytes)
Create an Ipv6AddressNoZone by interpreting input bytes as an IPv6 address.
|
A6NZ |
ipv6AddressNoZoneFor(InetAddress addr)
Create an Ipv6AddressNoZone by interpreting an
Inet6Address . |
A6NZ |
ipv6AddressNoZoneFrom(P6 prefix) |
protected abstract String |
ipv6AddressString(A6 addr) |
protected abstract P |
ipv6Prefix(P6 addr) |
P6 |
ipv6PrefixFor(A6 addr) |
P6 |
ipv6PrefixFor(A6 addr,
int mask) |
P6 |
ipv6PrefixFor(byte[] bytes)
Create a /128 Ipv6Prefix by interpreting input bytes as an IPv6 address.
|
P6 |
ipv6PrefixFor(byte[] address,
int mask)
Create a Ipv6Prefix by combining the address with a mask.
|
P6 |
ipv6PrefixFor(InetAddress addr)
Create a /128 Ipv6Prefix by interpreting input bytes as an IPv4 address.
|
P6 |
ipv6PrefixFor(InetAddress addr,
int mask)
Create a Ipv6Prefix by combining the address with a mask.
|
P6 |
ipv6PrefixForNoZone(A6NZ addr) |
P6 |
ipv6PrefixForNoZone(A6NZ addr,
int mask) |
P6 |
ipv6PrefixForShort(byte[] address,
int mask) |
P6 |
ipv6PrefixForShort(byte[] array,
int startOffset,
int mask) |
protected abstract String |
ipv6PrefixString(P6 prefix) |
byte[] |
ipv6PrefixToBytes(P6 prefix) |
protected abstract A4 |
maybeIpv4Address(A addr) |
protected abstract A4NZ |
maybeIpv4AddressNoZone(ANZ addr) |
protected abstract A6 |
maybeIpv6Address(A addr) |
protected abstract A6NZ |
maybeIpv6AddressNoZone(ANZ addr) |
Map.Entry<A4,Integer> |
splitIpv4Prefix(P4 prefix) |
Map.Entry<A4NZ,Integer> |
splitIpv4PrefixNoZone(P4 prefix) |
Map.Entry<A6,Integer> |
splitIpv6Prefix(P6 prefix) |
Map.Entry<A6NZ,Integer> |
splitIpv6PrefixNoZone(P6 prefix) |
@Nonnull public final A ipAddressFor(@Nonnull byte[] bytes)
bytes
- 4-byte (IPv4) or 6-byte (IPv6) arrayIllegalArgumentException
- if bytes has length different from 4 or 6NullPointerException
- if bytes is null@Nonnull public final A ipAddressFor(@Nonnull InetAddress addr)
@Nonnull public final ANZ ipAddressNoZoneFor(@Nonnull byte[] bytes)
bytes
- 4-byte (IPv4) or 6-byte (IPv6) arrayIllegalArgumentException
- if bytes has length different from 4 or 6NullPointerException
- if bytes is null@Nonnull public final ANZ ipAddressNoZoneFor(@Nonnull InetAddress addr)
@Nonnull public final P ipPrefixFor(@Nonnull byte[] bytes, int mask)
bytes
- Input address as a 4-byte (IPv4) or 16-byte (IPv6) arraymask
- Prefix maskIllegalArgumentException
- if bytes has length different from 4 or 16 or if mask is not
in range 0-32 or 0-128 respectivelyNullPointerException
- if bytes is null@Nonnull public final P ipPrefixFor(@Nonnull InetAddress addr, int mask)
@Nonnull public final InetAddress inetAddressFor(@Nonnull A addr)
@Nonnull public final InetAddress inetAddressForNoZone(@Nonnull ANZ addr)
@Nonnull public final Inet4Address inet4AddressFor(@Nonnull A4 addr)
@Nonnull public final Inet4Address inet4AddressForNoZone(@Nonnull A4NZ addr)
@Nonnull public final Inet6Address inet6AddressFor(@Nonnull A6 addr)
@Nonnull public final Inet6Address inet6AddressForNoZone(@Nonnull A6NZ addr)
@Nonnull public final A4 ipv4AddressFor(@Nonnull byte[] bytes)
bytes
- 4-byte arrayIllegalArgumentException
- if bytes has length different from 4NullPointerException
- if bytes is null@Nonnull public final A4 ipv4AddressFor(@Nonnull InetAddress addr)
Inet4Address
.addr
- An Inet4Address
IllegalArgumentException
- if addr is not an Inet4Address
NullPointerException
- if addr is null@Nonnull public final A4NZ ipv4AddressNoZoneFor(@Nonnull byte[] bytes)
bytes
- 4-byte arrayIllegalArgumentException
- if bytes has length different from 4NullPointerException
- if bytes is null@Nonnull public final A4NZ ipv4AddressNoZoneFor(@Nonnull InetAddress addr)
Inet4Address
.addr
- An Inet4Address
IllegalArgumentException
- if addr is not an Inet4Address
NullPointerException
- if addr is null@Nonnull public final P4 ipv4PrefixFor(@Nonnull byte[] bytes)
bytes
- four-byte arrayIllegalArgumentException
- if bytes has length different from 4NullPointerException
- if bytes is null@Nonnull public final P4 ipv4PrefixFor(@Nonnull byte[] address, int mask)
address = { 1, 2, 3, 4 }
and mask=24
will result in 1.2.3.4/24
.address
- Input address as a 4-byte arraymask
- Prefix maskIllegalArgumentException
- if bytes has length different from 4 or if mask is not in range 0-32NullPointerException
- if bytes is null@Nonnull public final P4 ipv4PrefixForShort(@Nonnull byte[] array, int startOffset, int mask)
@Nonnull public final P4 ipv4PrefixFor(@Nonnull InetAddress addr)
Inet4Address
addr
- An Inet4Address
IllegalArgumentException
- if addr is not an Inet4AddressNullPointerException
- if addr is null@Nonnull public final P4 ipv4PrefixFor(@Nonnull InetAddress addr, int mask)
addr
- An Inet4Address
mask
- Prefix maskIllegalArgumentException
- if addr is not an Inet4Address or if mask is not in range 0-32NullPointerException
- if addr is null@Nonnull public final Map.Entry<A4NZ,Integer> splitIpv4PrefixNoZone(@Nonnull P4 prefix)
@Nonnull public final A6 ipv6AddressFor(@Nonnull byte[] bytes)
bytes
- 16-byte arrayIllegalArgumentException
- if bytes has length different from 16NullPointerException
- if bytes is null@Nonnull public final A6 ipv6AddressFor(@Nonnull InetAddress addr)
Inet6Address
.addr
- An Inet6Address
IllegalArgumentException
- if addr is not an Inet6Address
NullPointerException
- if addr is null@Nonnull public final A6NZ ipv6AddressNoZoneFor(@Nonnull byte[] bytes)
bytes
- 16-byte arrayIllegalArgumentException
- if bytes has length different from 16NullPointerException
- if bytes is null@Nonnull public final A6NZ ipv6AddressNoZoneFor(@Nonnull InetAddress addr)
Inet6Address
.addr
- An Inet6Address
IllegalArgumentException
- if addr is not an Inet6Address
NullPointerException
- if addr is null@Nonnull public final P6 ipv6PrefixFor(@Nonnull byte[] bytes)
bytes
- four-byte arrayIllegalArgumentException
- if bytes has length different from 16NullPointerException
- if bytes is null@Nonnull public final P6 ipv6PrefixFor(@Nonnull byte[] address, int mask)
address
- Input address as a 16-byte arraymask
- Prefix maskIllegalArgumentException
- if bytes has length different from 16 or if mask is not in range 0-128NullPointerException
- if bytes is null@Nonnull public final P6 ipv6PrefixForShort(@Nonnull byte[] array, int startOffset, int mask)
@Nonnull public final P6 ipv6PrefixFor(@Nonnull InetAddress addr)
addr
- an Inet6Address
IllegalArgumentException
- if addr is not an Inet6Address or if mask is not in range 0-128NullPointerException
- if addr is null@Nonnull public final P6 ipv6PrefixFor(@Nonnull InetAddress addr, int mask)
addr
- Input addressmask
- Prefix maskIllegalArgumentException
- if addr is not an Inet6Address or if mask is not in range 0-128NullPointerException
- if addr is null@Nonnull public final Map.Entry<A6NZ,Integer> splitIpv6PrefixNoZone(@Nonnull P6 prefix)
Copyright © 2019 OpenDaylight. All rights reserved.