Module inet.ipaddr

Class IPv4AddressStringParameters

    • Field Detail

      • DEFAULT_ALLOW_IPV4_INET_ATON

        public static final boolean DEFAULT_ALLOW_IPV4_INET_ATON
        See Also:
        Constant Field Values
      • DEFAULT_ALLOW_IPV4_INET_ATON_SINGLE_SEGMENT_MASK

        public static final boolean DEFAULT_ALLOW_IPV4_INET_ATON_SINGLE_SEGMENT_MASK
        See Also:
        Constant Field Values
      • DEFAULT_ALLOW_IPV4_inet_aton_extraneous_digits

        public static final boolean DEFAULT_ALLOW_IPV4_inet_aton_extraneous_digits
        See Also:
        Constant Field Values
      • inet_aton_hex

        public final boolean inet_aton_hex
        Allows ipv4 inet_aton hexadecimal format 0xa.0xb.0xc.0xd
      • inet_aton_leading_zeros

        public final boolean inet_aton_leading_zeros
        Allows ipv4 inet_aton hexadecimal or octal to have leading zeros, such as in the first two segments of 0x0a.00b.c.d The first 0 is not considered a leading zero, it either denotes octal or hex depending on whether it is followed by an 'x'. Zeros that appear afterwards are inet_aton leading zeros.
      • inet_aton_joinedSegments

        public final boolean inet_aton_joinedSegments
        Allows ipv4 joined segments like 1.2.3, 1.2, or just 1 For the case of just 1 segment, the behaviour is controlled by AddressStringParameters.allowSingleSegment
      • inet_aton_single_segment_mask

        public final boolean inet_aton_single_segment_mask
        If you allow ipv4 joined segments, whether you allow a mask that looks like a prefix length: 1.2.3.5/255
      • inet_aton_extraneous_digits

        public final boolean inet_aton_extraneous_digits
        Allows single-segment inet_aton strings to have extraneous digits. This allows up to 31 digits when parsing for both IPv4 and IPv6. This allows an unlimited number of digits when parsing for just IPv4 (ie IPAddressStringParameters.allowIPv6 is false).

        Digits that go beyond 32 bits are essentially ignored. The number of digits before exceeding 32 bits depends on the radix. The value of the most significant digit before exceeding 32 bits depends on the radix.

        The resulting address is the modulus of the address with the 32-bit unsigned int maximum value, or equivalently the truncation of the address to 32 bits.

    • Constructor Detail

      • IPv4AddressStringParameters

        @Deprecated
        public IPv4AddressStringParameters​(boolean allowLeadingZeros,
                                           boolean allowCIDRPrefixLeadingZeros,
                                           boolean allowUnlimitedLeadingZeros,
                                           AddressStringParameters.RangeParameters rangeOptions,
                                           boolean allowWildcardedSeparator,
                                           boolean allowPrefixesBeyondAddressSize,
                                           boolean inet_aton_hex,
                                           boolean inet_aton_octal,
                                           boolean inet_aton_leading_zeros,
                                           boolean inet_aton_joinedSegments,
                                           boolean inet_aton_single_segment_mask,
                                           IPv4AddressNetwork network)
        Deprecated.
        Retained for backwards compatibility
        Library users are strongly encourage to use the builder classes instead of this constructor.
      • IPv4AddressStringParameters

        public IPv4AddressStringParameters​(boolean allowLeadingZeros,
                                           boolean allowCIDRPrefixLeadingZeros,
                                           boolean allowUnlimitedLeadingZeros,
                                           AddressStringParameters.RangeParameters rangeOptions,
                                           boolean allowWildcardedSeparator,
                                           boolean allowPrefixesBeyondAddressSize,
                                           boolean allowBinary,
                                           boolean inet_aton_hex,
                                           boolean inet_aton_octal,
                                           boolean inet_aton_leading_zeros,
                                           boolean inet_aton_joinedSegments,
                                           boolean inet_aton_single_segment_mask,
                                           boolean inet_aton_extraneous_digits,
                                           IPv4AddressNetwork network)
        Constructs the parameters for IPv4-specific string parsing.
        Users are strongly encouraged to use the nested Builder class instead of this constructor.
        Parameters:
        allowLeadingZeros -
        allowCIDRPrefixLeadingZeros -
        allowUnlimitedLeadingZeros -
        rangeOptions -
        allowWildcardedSeparator -
        allowPrefixesBeyondAddressSize -
        allowBinary -
        inet_aton_hex -
        inet_aton_octal -
        inet_aton_leading_zeros -
        inet_aton_joinedSegments -
        inet_aton_single_segment_mask -
        network -