class GeoIP
extends Object
Manage geoip lookup in a file with the Tor geoip format.
The lookup is expensive, so a lookup is queued with add().
The actual lookup of multiple IPs is fired with lookup().
To get a country for an IP, use get() which returns a lower-case,
generally two-letter country code or null.
Everything here uses longs, since Java is signed-only, the file is
sorted by unsigned, and we don't store the table in memory
(unlike in Blocklist.java, where it's in-memory so we want to be
space-efficient)
- Author:
- zzz