| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private Inet4Address | |
| private final byte[] | |
| private int | |
| public static final CidrAddress | INET4_ANY_CIDR
The CIDR address representing all IPv4 addresses. |
| public static final CidrAddress | INET6_ANY_CIDR
The CIDR address representing all IPv6 addresses. |
| private final int | |
| private final InetAddress | |
| private static final long | |
| private String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static boolean | |
| public int | |
| public int | compareTo(final CidrAddress
the object to be compared. other)Implements java. |
| public static CidrAddress | Returns: the CIDR address (notnull)the network address (must not be networkAddress, int null)the netmask bits (0-32 for IPv4, or 0-128 for IPv6) netmaskBits)Create a new CIDR address. |
| public static CidrAddress | Returns: the CIDR address (notnull)the network address bytes (must not be addressBytes, int null, must be 4 bytes for IPv4 or 16 bytes for IPv6)the netmask bits (0-32 for IPv4, or 0-128 for IPv6) netmaskBits)Create a new CIDR address. |
| pack-priv static CidrAddress | |
| public boolean | equals(final Object
the reference object with which to compare. obj)Overrides java. |
| public boolean | |
| public Inet4Address | Returns: the broadcast address for this CIDR block, ornull if there is noneGet the broadcast address for this CIDR block. |
| public int | |
| public InetAddress | |
| public int | Returns: the scope ID, or 0 if there is none or the address is an IPv4 addressGet the match address scope ID (if it is an IPv6 address). |
| public int | |
| private static byte[] | |
| private static byte[] | |
| public boolean | Returns: true if the address matches, false otherwisethe address to test address)Determine if this CIDR address matches the given address. |
| public boolean | Returns: true if the address bytes match, false otherwisethe address bytes to test bytes)Determine if this CIDR address matches the given address bytes. |
| public boolean | Returns: true if the address bytes match, false otherwisethe address bytes to test bytes, int the scope ID, or 0 to match no scope scopeId)Determine if this CIDR address matches the given address bytes. |
| public boolean | Returns: true if the address matches, false otherwisethe address to test address)Determine if this CIDR address matches the given address. |
| public boolean | Returns: true if the address matches, false otherwisethe address to test address)Determine if this CIDR address matches the given address. |
| public boolean | Returns: true if the given block is enclosed by this one, false otherwisethe address to test address)Determine if this CIDR address matches the given CIDR address. |
| public String | |
| pack-priv Object |
| broadcast | back to summary |
|---|---|
| private Inet4Address broadcast | |
| cachedBytes | back to summary |
|---|---|
| private final byte[] cachedBytes | |
| hashCode | back to summary |
|---|---|
| private int hashCode | |
| INET4_ANY_CIDR | back to summary |
|---|---|
| public static final CidrAddress INET4_ANY_CIDR The CIDR address representing all IPv4 addresses. | |
| INET6_ANY_CIDR | back to summary |
|---|---|
| public static final CidrAddress INET6_ANY_CIDR The CIDR address representing all IPv6 addresses. | |
| netmaskBits | back to summary |
|---|---|
| private final int netmaskBits | |
| networkAddress | back to summary |
|---|---|
| private final InetAddress networkAddress | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| toString | back to summary |
|---|---|
| private String toString | |
| CidrAddress | back to summary |
|---|---|
| private CidrAddress(final InetAddress networkAddress, final int netmaskBits) | |
| bitsMatch | back to summary |
|---|---|
| private static boolean bitsMatch(byte[] address, byte[] test, int bits) | |
| compareAddressBytesTo | back to summary |
|---|---|
| public int compareAddressBytesTo(final byte[] otherBytes, final int otherNetmaskBits, final int scopeId) | |
| compareTo | back to summary |
|---|---|
| public int compareTo(final CidrAddress other) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| create | back to summary |
|---|---|
| public static CidrAddress create(InetAddress networkAddress, int netmaskBits) Create a new CIDR address.
| |
| create | back to summary |
|---|---|
| public static CidrAddress create(byte[] addressBytes, int netmaskBits) Create a new CIDR address.
| |
| create | back to summary |
|---|---|
| pack-priv static CidrAddress create(byte[] addressBytes, int netmaskBits, boolean clone) | |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| equals | back to summary |
|---|---|
| public boolean equals(final CidrAddress obj) | |
| getBroadcastAddress | back to summary |
|---|---|
| public Inet4Address getBroadcastAddress() Get the broadcast address for this CIDR block. If the block has no broadcast address (either because it is IPv6
or it is too small) then
| |
| getNetmaskBits | back to summary |
|---|---|
| public int getNetmaskBits() Get the netmask bits. This will be in the range 0-32 for IPv4 addresses, and 0-128 for IPv6 addresses.
| |
| getNetworkAddress | back to summary |
|---|---|
| public InetAddress getNetworkAddress() Get the network address. The returned address has a resolved name consisting of the most compact valid string representation of the network of this CIDR address.
| |
| getScopeId | back to summary |
|---|---|
| public int getScopeId() Get the match address scope ID (if it is an IPv6 address).
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| maskBits0 | back to summary |
|---|---|
| private static byte[] maskBits0(byte[] address, int bits) | |
| maskBits1 | back to summary |
|---|---|
| private static byte[] maskBits1(byte[] address, int bits) | |
| matches | back to summary |
|---|---|
| public boolean matches(InetAddress address) Determine if this CIDR address matches the given address.
| |
| matches | back to summary |
|---|---|
| public boolean matches(byte[] bytes) Determine if this CIDR address matches the given address bytes.
| |
| matches | back to summary |
|---|---|
| public boolean matches(byte[] bytes, int scopeId) Determine if this CIDR address matches the given address bytes.
| |
| matches | back to summary |
|---|---|
| public boolean matches(Inet4Address address) Determine if this CIDR address matches the given address.
| |
| matches | back to summary |
|---|---|
| public boolean matches(Inet6Address address) Determine if this CIDR address matches the given address.
| |
| matches | back to summary |
|---|---|
| public boolean matches(CidrAddress address) Determine if this CIDR address matches the given CIDR address. This will be true only when the given CIDR block is wholly enclosed by this one.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |
| writeReplace | back to summary |
|---|---|
| pack-priv Object writeReplace() | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final byte[] | |
| pack-priv final int | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Object |
| b | back to summary |
|---|---|
| pack-priv final byte[] b | |
| m | back to summary |
|---|---|
| pack-priv final int m | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| Ser | back to summary |
|---|---|
| pack-priv Ser(final byte[] b, final int m) | |
| readResolve | back to summary |
|---|---|
| pack-priv Object readResolve() | |