File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 11CHANGELOG
22=========
33
4+ 3.1.0
5+ ------------------
6+ * Reader supports iterating over the whole database or within a network.
7+
483.0.0 (2022-12-12)
59------------------
610
Original file line number Diff line number Diff line change @@ -120,6 +120,28 @@ public class Lookup {
120120}
121121```
122122
123+ You can also use the reader object to iterate over the database.
124+ The ` reader.networks() ` and ` reader.networksWithin() ` methods can
125+ be used for this purpose.
126+
127+ ``` java
128+ Reader reader = new Reader (file);
129+ Networks networks = reader. networks(false , Map . class);
130+
131+ while (networks. hasNext()) {
132+ DatabaseRecord<Map<String , String > > iteration = networks. next();
133+
134+ // Get the data.
135+ Map<String , String > data = iteration. getData();
136+
137+ // The IP Address
138+ InetAddress ipAddress = InetAddress . getByName(data. get(" ip" ));
139+
140+ // ...
141+ }
142+ ```
143+
144+
123145## Caching ##
124146
125147The database API supports pluggable caching (by default, no caching is
You can’t perform that action at this time.
0 commit comments