Java library for handling IP addresses and subnets, both IPv4 and IPv6
APACHE-2.0 License
Bot releases are visible (Hide)
mergeToDualPrefixBlocks
and mergeToDualSequentialBlocks
for combined IPv4/IPv6 mergingAddressValueException
and IncompatibleAddressException
, issue #127containingFirstIterator
, use all-node containingFirstAllNodeIterator
insteadPublished by seancfoley 8 months ago
shortestPrefixMatch
trie methodsenumerate
methods, the inverse of the increment
methods, to find the position of an address in a subnet, or to find the distance between two addressesincrement
method accepting a BigInteger
argument to IPv6Address
and IPv6AddressSection
IPv6Address
from two longsreplace
methods to address classes that take address sectionsoverlaps
methods to check for overlapping subnets, and for checking sequential range overlap with a subnetfloor
/lower
/ceiling
/higher
methods to the address trie types, these methods previously accessible only from trie setsPublished by seancfoley 9 months ago
Published by seancfoley 9 months ago
Published by seancfoley almost 2 years ago
Published by seancfoley over 2 years ago
Published by seancfoley about 4 years ago
Published by seancfoley about 4 years ago
longestPrefixMatch
and longestPrefixMatchNode
methods in AddressTrie
, AddressTrieMap
and AddressTrieSet
, for more efficient matching without using the linked list from elementsContaining
toSegmentedBinaryString
0X
and binary 0B
mergeToPrefixBlocks
and mergeToSequentialBlocks
, also resulting in a different ordering of the result, sorted by lower value. The old ordering remains attainable with the comparator IPAddressSegmentSeries.getPrefixLenComparator
asNewTrie
to TrieNode
to create a new trie which is a copy of the sub-trie with the node as rootIPAddressSeqRange.extend(IPAddressRange)
to extend ranges more efficientlyIPAddress.applyToBounds
to use covering and spanning methods with multiple addresses or subnets, not just twoIPAddressString.prefixContains(IPAddressString)
for quick prefix-based containment checksprefixEquals
in IPAddressString
vs IPAddress
with addresses that have no prefix lengthIPAddressString.prefixEquals
involving prefix not on segment boundaryspanWithPrefixBlocks
not splitting up subnets with multiple prefix blocksallowsReverseRange
, also added missing allowBase85
Published by seancfoley over 4 years ago
Fixes reversed sub-node order with trie block size iterator
Published by seancfoley over 4 years ago
This version introduces address tries, associative address tries, address sets backed by address tries, and maps backed by associative address tries
Published by seancfoley almost 5 years ago
Minor fixes to IPv4/v6 conversions 6 to 4, isatap, and embedded address extraction.
Published by seancfoley almost 5 years ago
This version introduces methods for Java 8 functional-style operations.
stream
, prefixStream
, prefixStream(int prefixLength)
, prefixBlockStream
, prefixBlockStream(int prefixLength)
, blockStream(int segmentCount)
, sequentialBlockStream
, segmentsStream
spliterator
, prefixSpliterator
, prefixSpliterator(int prefixLength)
, prefixBlockSpliterator
, prefixBlockSpliterator(int prefixLength)
, blockSpliterator(int segmentCount)
, sequentialBlockSpliterator
, segmentsSpliterator
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)
coverWithPrefixBlock
method to find single covering prefix block, the smallest prefix block covering two subnets or addressesIPAddressString
and HostName
parsed mask access through getMask
methodIPAddressString
instances with masksIPAddressString.getDivisionGrouping
mergeToPrefixBlocks
exception on /1 prefix blocksPublished by seancfoley almost 5 years ago
Published by seancfoley almost 5 years ago
Mostly parsing and masking improvements.
Published by seancfoley almost 5 years ago
Published by seancfoley over 5 years ago
Published by seancfoley almost 6 years ago
Published by seancfoley almost 6 years ago
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.
Published by seancfoley almost 6 years ago
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.
The Java 8 code in this release and previous releases is fully compatible with Android using Android API level 24 or higher.
Published by seancfoley almost 6 years ago