Skip to content

Commit

Permalink
Add README and CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
faktas2 committed Nov 7, 2023
1 parent 4d93a71 commit 6a54119
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
CHANGELOG
=========

3.1.0
------------------
* Reader supports iterating over the whole database or within a network.

3.0.0 (2022-12-12)
------------------

Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,27 @@ public class Lookup {
}
```

You can also use the reader object to iterate over the database.
The `reader.networks()` method can be used for this purpose.

```java
Reader reader = new Reader(file);
Networks networks = reader.networks(false, Map.class);

while(networks.hasNext()) {
DatabaseRecord<Map<String, String>> iteration = networks.next();

// Get the data.
Map<String, String> data = iteration.getData();

// The IP Address
InetAddress ipAddress = InetAddress.getByName(data.get("ip"));

// ...
}
```


## Caching ##

The database API supports pluggable caching (by default, no caching is
Expand Down

0 comments on commit 6a54119

Please sign in to comment.