- java.lang.Object
-
- inet.ipaddr.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 Summary
Constructors Constructor Description IPAddressGenerator()
IPAddressGenerator(IPAddressStringParameters options)
IPAddressGenerator(IPv4AddressNetwork ipv4Network, IPv6AddressNetwork ipv6Network)
Copies the default string options but inserts the given networks.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IPAddress
from(byte[] bytes)
IPAddress
from(byte[] bytes, int byteStartIndex, int byteEndIndex)
IPAddress
from(byte[] bytes, int byteStartIndex, int byteEndIndex, java.lang.Integer networkPrefixLength)
IPAddress
from(byte[] bytes, java.lang.Integer prefixLength)
IPAddress
from(IPAddress.IPVersion version, Address.SegmentValueProvider lowerValueProvider, Address.SegmentValueProvider upperValueProvider, java.lang.Integer prefixLength)
IPAddress
from(java.net.InetAddress inetAddress)
IPAddress
from(java.net.InetAddress inetAddress, java.lang.Integer prefixLength)
IPAddress
from(java.net.InterfaceAddress interfaceAddress)
-
-
-
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
-
-
IPAddressGenerator
public IPAddressGenerator(IPAddressStringParameters options)
-
-
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)
-
from
public IPAddress from(IPAddress.IPVersion version, Address.SegmentValueProvider lowerValueProvider, Address.SegmentValueProvider upperValueProvider, java.lang.Integer prefixLength)
-
-