Package org.jppf.net

Class IPv6AddressNetmask


public class IPv6AddressNetmask extends IPv6AddressPattern
Represents a netmask used for IPv6 addresses inclusion and exclusion lists.
A netmask is in CIDR notation and represents an IPv6 address of which only the first N bits are significant.

If no slash is included and there is no double colon ("::") the string is treated as a IPv6AddressPattern; otherwise it must be a valid IPv6 address. This class does not handle Dotted Quad notation.

Examples:

  • 1080::8:800:200C:417A represents a single IPv6 address
  • 1080::8:800:200C:417A/128 represents a single IPv6 address
  • 1080::8:800:200C:417A/125 represents all IPv6 addresses in the range 1080::8:800:200C:4178 - 1080::8:800:200C:417F
  • 1080::8:800:200C:417A/112 represents all IPv6 addresses in the range 1080::8:800:200C:0 - 1080::8:800:200C:FFFF
  • 1080::8:800:200C:417A/96 represents all IPv6 addresses in the range 1080::8:800:0:0 - 1080::8:800:FFFF:FFFF
Since:
4.2
Author:
Daniel Widdis
  • Constructor Details

    • IPv6AddressNetmask

      public IPv6AddressNetmask(String source) throws IllegalArgumentException
      Initialize this object with the specified string pattern.
      Parameters:
      source - the source pattern as a string.
      Throws:
      IllegalArgumentException - if the pattern is null or invalid.
  • Method Details

    • main

      public static void main(String[] args)
      Main method.
      Parameters:
      args - not used.