Releases: seancfoley/IPAddress
Version 5.2.1
Minor fixes to IPv4/v6 conversions 6 to 4, isatap, and embedded address extraction.
Version 5.2.0
This version introduces methods for Java 8 functional-style operations.
- added stream methods for addresses, address sections, address segments, and ip address sequential ranges:
stream
,prefixStream
,prefixStream(int prefixLength)
,prefixBlockStream
,prefixBlockStream(int prefixLength)
,blockStream(int segmentCount)
,sequentialBlockStream
,segmentsStream
- added corresponding spliterator methods:
spliterator
,prefixSpliterator
,prefixSpliterator(int prefixLength)
,prefixBlockSpliterator
,prefixBlockSpliterator(int prefixLength)
,blockSpliterator(int segmentCount)
,sequentialBlockSpliterator
,segmentsSpliterator
- added functions to create a single stream from multiple spliterators in
AddressComponentRange
:<T extends AddressComponent> Stream<T> stream(Function<T, Stream<? extends T>> addrStreamFunc, T ...components)
<T extends AddressComponent> Stream<T> stream(Function<T, Stream<? extends T>> addrStreamFunc, Collection<? extends T> components)
- added
coverWithPrefixBlock
method to find single covering prefix block, the smallest prefix block covering two subnets or addresses - added
IPAddressString
andHostName
parsed mask access throughgetMask
method - made sub-typing of address classes easier by loosening restrictions on using multiple network objects
- altered network mask with prefix length so that it is single host
- fixed a serialization issue involving
IPAddressString
instances with masks - fixed a threading issue with
IPAddressString.getDivisionGrouping
- fixed issue #32,
mergeToPrefixBlocks
exception on /1 prefix blocks
Version 4.3.3
- fix to issue #32, mergePrefixBlocks exception on /1 prefix blocks
- fixed 4.3.2 javadoc
Version 5.1.0
Mostly parsing and masking improvements.
- getSequentialRange() method added to IPAddressString for direct access to sequential range
- improved handling of masking and bitwise-oring subnets. isMaskCompatibleWithRange replaced by maskRange, same with bitwise-or.
- getDivisionGrouping() method added to IPAddressString for "as-is" parsing
- toString() for division strings adjusted, no longer using '*' due to varying bit lengths for divisions and potentially no segment separator to indicate bit length, also using radix matching parsed string
- reverse ranges allowed in parsed strings
- improved control/support of inferred range boundaries
- fix to leading zeros detection for issue #20
- fix to generation of IPv6 sections from bytes
- adjusted IPAddress.toAddressString() to improve toHostAddress() in resulting IPAddressString
- added toZeroNetwork() to get IP address with network bits zeroed
- added getNetworkMask() and getHostMask() to IPAddressSegmentSeries as requested in issue #27
- a few other minor fixes
Version 4.3.1
- fix to leading zeros detection for issue #20
- fix to generation of IPv6 sections from bytes
- adjusted IPAddress.toAddressString() to improve toHostAddress() in resulting IPAddressString
- added toZeroNetwork() to get IP address with network bits zeroed
- added getNetworkMask() and getHostMask() to IPAddressSegmentSeries as requested in issue #27
- multicast fix and fix to toInetAddress()
Version 5.0.2
- added getLeadingBitCount(boolean) getTrailingsBitCount(boolean) for getting the number of leading or trailing consecutive one or zero bits in an ip address or ip address section
- fixed an IPAddressString.contains issue #13 (comment)
- added containsNonZeroHosts for determining if a subnet/address contains the non-zero host addresses of a subnet or address requested in #13 (comment)
- added HostName.asInetSocketAddress for host names or ip addresses with ports
- added isZeroHost() and isZeroHost(int) to ip address and ip address sections
- fixed issue #15, conversion to InetAddress
- fixed issue with ipv6 multicast check
- added more constructors to HostName for InetSocketAddress and InterfaceAddress
Version 5.0.1
- fixes to IPAddressString.contains (no issues exist with IPAddress.contains)
- span with and merge to prefix blocks return only addresses with prefix lengths (including bit-count prefix lengths)
- span with and merge to sequential blocks return no addresses with prefix lengths
- removeBitCountPrefixLength() removes bit-count prefix lengths
Version 1.0.1
Version 1.0.1 source can be compiled with a Java 6 compiler. The IPAddress.jar included with this release is compiled with a Java 6 compiler, and hence can be run on Java 6, Java 7, and up.
Version 5.0.0
This version introduces new address range classes and reorganizes classes and code in the inet.ipaddr.format package.
This version is compatible with java 8 and the distributed jars are compiled with java 8, but those jars also include the module-info class for the Java Platform Module System (JPMS) introduced with Java 9, and hence can be used as the JPMS inet.ipaddr module with Java 9, 10, and 11. When compiling the source for Java 8 the module-info source file must be ignored or removed. When running the distributed jars with Java 8 no changes are required since the module-info class will simply be ignored.
- includes the parsing performance improvements introduced in version 4.3.0 as well as the other 4.3.0 improvements and additions
- added address range functionality with the new IPAddressSeqRange class and the IPv4 and IPv6 subclasses, along with their associated operations and iterators
- added IPAddressRange interface for commonality between IPAddress and IPAddressSeqRange ranges
- reorganization of classes and interfaces in inet.ipaddr.format package to standard, large, and string subpackages
- expansion of the large division functionality, which uses BigInteger for address division values, to match the standard functionality which uses longs for address divisions
- new static toNormalizedString string production methods to produce strings directly without intervening objects
- new iterators: blockIterator(int), sequentialBlockIterator(), prefixIterator(), prefixBlockIterator(int), and their associated count methods, namely getSequentialBlockCount to go with sequentialBlockIterator() and prefixCount to go with iterator(), nonZeroHostIterator() and prefixBlockIterator(). Also added the isSequential() method.
- added mergeToSequentialBlocks to match mergeToPrefixBlocks
- works with Java 8, 9, 10, 11 and upwards, comprises the inet.ipaddr module for Java 9 and upwards
The Java 8 code in this release and previous releases is fully compatible with Android using Android API level 24 or higher.
Version 4.3.0
- address string parsing performance improvements
- changed source encoding to UTF-8 from Cp1252 and changed source to unix line separators
- new incrementBoundary method to increment from lower or upper subnet boundary
- increment method changed for consistency between single addresses and subnets:
changed increment(long) behaviour for subnets to match array indexing, with increment 0 the first element in the subnet, and also matching the behavior for non-subnets, with an increment of 1 giving the element above the upper element of the range - fixed issue with incrementing a multiple prefix block subnet
- added byte copy that takes an index into the target bytes
- made IPAddressCreator static
- added prefixEquals and contains methods to IPAddressString for optimized containment checks
- performance improvement caching Integer prefix lengths of length 128
- fixed ArrayIndexOutOfBoundException in isPrefixSubnet (issue #10)