Package org.apache.commons.net.util

# Class SubnetUtils6.SubnetInfo

java.lang.Object
org.apache.commons.net.util.SubnetUtils6.SubnetInfo

Enclosing class:
  `SubnetUtils6`

public final class SubnetUtils6.SubnetInfo extends Object
Contains IPv6 subnet summary information.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getAddress()`
  Gets the address used to initialize this subnet.
  `BigInteger`
  `getAddressCount()`
  Gets the count of available addresses in this subnet.
  `String`
  `getCidrSignature()`
  Gets the CIDR notation for this subnet.
  `String`
  `getHighAddress()`
  Gets the highest address in this subnet.
  `String`
  `getLowAddress()`
  Gets the lowest address in this subnet (the network address).
  `String`
  `getNetworkAddress()`
  Gets the network address for this subnet.
  `int`
  `getPrefixLength()`
  Gets the prefix length for this subnet.
  `boolean`
  `isInRange(byte[] addr)`
  Tests if the given address is within this subnet range.
  `boolean`
  `isInRange(String addr)`
  Tests if the given address is within this subnet range.
  `boolean`
  `isInRange(BigInteger addr)`
  Tests if the given address is within this subnet range.
  `boolean`
  `isInRange(Inet6Address addr)`
  Tests if the given address is within this subnet range.
  `String`
  `toString()`
  Returns a summary of this subnet for debugging.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### getAddress

    public String getAddress()
    Gets the address used to initialize this subnet.
    Returns:
      the address as a string in standard IPv6 format.

  - ### getAddressCount

    public BigInteger getAddressCount()
    Gets the count of available addresses in this subnet.

    For IPv6, this can be astronomically large. A /64 subnet has 2^64 addresses.

    Returns:
      the count of addresses as a BigInteger.

  - ### getCidrSignature

    public String getCidrSignature()
    Gets the CIDR notation for this subnet.
    Returns:
      the CIDR signature (e.g., "2001:db8::1/64").

  - ### getHighAddress

    public String getHighAddress()
    Gets the highest address in this subnet.
    Returns:
      the high address as a string in standard IPv6 format.

  - ### getLowAddress

    public String getLowAddress()
    Gets the lowest address in this subnet (the network address).
    Returns:
      the low address as a string in standard IPv6 format.

  - ### getNetworkAddress

    public String getNetworkAddress()
    Gets the network address for this subnet.
    Returns:
      the network address as a string in standard IPv6 format.

  - ### getPrefixLength

    public int getPrefixLength()
    Gets the prefix length for this subnet.
    Returns:
      the prefix length (0-128).

  - ### isInRange

    public boolean isInRange(BigInteger addr)
    Tests if the given address is within this subnet range.
    Parameters:
      `addr` - the IPv6 address to test (as a BigInteger).
    Returns:
      true if the address is in range.

  - ### isInRange

    public boolean isInRange(byte[] addr)
    Tests if the given address is within this subnet range.
    Parameters:
      `addr` - the IPv6 address to test as a byte array (16 bytes).
    Returns:
      true if the address is in range.

  - ### isInRange

    public boolean isInRange(Inet6Address addr)
    Tests if the given address is within this subnet range.
    Parameters:
      `addr` - the IPv6 address to test.
    Returns:
      true if the address is in range.

  - ### isInRange

    public boolean isInRange(String addr)
    Tests if the given address is within this subnet range.
    Parameters:
      `addr` - the IPv6 address to test as a string.
    Returns:
      true if the address is in range.
    Throws:
      `IllegalArgumentException` - if the address cannot be parsed.

  - ### toString

    public String toString()
    Returns a summary of this subnet for debugging.
    Overrides:
      `toString` in class `Object`
    Returns:
      a multi-line debug string summarizing this subnet.