Module inet.ipaddr
Package inet.ipaddr

Class IPAddressNetwork.IPAddressGenerator

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    IPAddressNetwork<T extends IPAddress,​R extends IPAddressSection,​E extends IPAddressSection,​S extends IPAddressSegment,​J extends java.net.InetAddress>

    public static class IPAddressNetwork.IPAddressGenerator
    extends java.lang.Object
    implements java.io.Serializable

    A factory of address strings or host names, which can be particularly useful if you are using your own network, or if you are using your own validation options.

    Author:
    sfoley
    See Also:
    Serialized Form
    • Constructor Detail

      • IPAddressGenerator

        public IPAddressGenerator()
      • IPAddressGenerator

        public IPAddressGenerator​(IPv4AddressNetwork ipv4Network,
                                  IPv6AddressNetwork ipv6Network)
        Copies the default string options but inserts the given networks. Either argument can be null to use the default networks.
        Parameters:
        ipv4Network -
        ipv6Network -
    • Method Detail

      • from

        public IPAddress from​(java.net.InetAddress inetAddress)
      • from

        public IPAddress from​(java.net.InetAddress inetAddress,
                              java.lang.Integer prefixLength)
      • from

        public IPAddress from​(java.net.InterfaceAddress interfaceAddress)
      • from

        public IPAddress from​(byte[] bytes)
      • from

        public IPAddress from​(byte[] bytes,
                              int byteStartIndex,
                              int byteEndIndex)
      • from

        public IPAddress from​(byte[] bytes,
                              int byteStartIndex,
                              int byteEndIndex,
                              java.lang.Integer networkPrefixLength)
      • from

        public IPAddress from​(byte[] bytes,
                              java.lang.Integer prefixLength)