Module inet.ipaddr

Class IPv4Address

All Implemented Interfaces:
AddressComponent, AddressSegmentSeries, AddressComponentRange, AddressDivisionSeries, AddressItem, AddressItemRange, IPAddressDivisionSeries, IPAddressRange, AddressStringDivisionSeries, IPAddressStringDivisionSeries, IPAddressSegmentSeries, Serializable, Comparable<AddressItem>, Iterable<IPv4Address>

public class IPv4Address extends IPAddress implements Iterable<IPv4Address>
An IPv4 address, or a subnet of multiple IPv4 addresses. Each segment can represent a single value or a range of values.

You can construct an IPv4 address from a byte array, from an int, from a Address.SegmentValueProvider, from Inet4Address, from an IPv4AddressSection of 4 segments, or from an array of 4 IPv4AddressSegment objects.

To construct one from a String use IPAddressString.toAddress() or IPAddressString.getAddress(), IPAddressString.toHostAddress() or IPAddressString.getHostAddress()

Author:
sfoley
See Also: