GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - JasonBabylon/geoip-api-java: GeoIP Legacy ,QQWry, IPP.NET Java API

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

226 Commits
226 Commits

Folders and files

NameName
Last commit message
Last commit date
dev-bin
dev-bin
 
 
examples
examples
 
 
src
src
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
Changes.md
Changes.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

Repository files navigation

GeoIP Legacy Java API

Build Status

Important Note

This API is for the GeoIP Legacy format (dat). To read the MaxMind DB format (mmdb) used by GeoIP2, please see our GeoIP2 Java API.

Define Your Dependencies

We recommend installing this package with Maven. To do this, add the dependency to your pom.xml:

    <dependency>
        <groupId>com.maxmind.geoip</groupId>
        <artifactId>geoip-api</artifactId>
        <version>1.3.1</version>
    </dependency>

Building Manually

Installation

mvn clean install

Packaging

mvn package

The jar file will be in the target directory.

Testing

mvn test

IP Geolocation Usage

IP geolocation is inherently imprecise. Locations are often near the center of the population. Any location provided by a GeoIP database or web service should not be used to identify a particular address or household.

Memory Caching and Other Options

The following options can be passed as the second parameter to the LookupService constructor.

  • GEOIP_STANDARD - Read database from file system. Uses the least memory.
  • GEOIP_MEMORY_CACHE - Load database into memory. This provides faster performance but uses more memory
  • GEOIP_CHECK_CACHE - Check for updated database. If database has been updated, reload file handle and/or memory cache.
  • GEOIP_INDEX_CACHE - Cache only the most frequently accessed index portion of the database, resulting in faster lookups than GEOIP_STANDARD, but less memory usage than GEOIP_MEMORY_CACHE. This is useful for larger databases such as GeoIP Legacy Organization and GeoIP Legacy City. Note: for GeoIP Legacy Country, Region and Netspeed databases, GEOIP_INDEX_CACHE is equivalent to GEOIP_MEMORY_CACHE.

These options may be combined. For example:

LookupService cl = new LookupService(dbfile,
    LookupService.GEOIP_MEMORY_CACHE | LookupService.GEOIP_CHECK_CACHE);

Thread Safety

As of version 1.1.4 this API is thread safe.

2017-01-09 Added

QQWry, IPIP.NET

About

GeoIP Legacy ,QQWry, IPP.NET Java API

Resources

Readme
LGPL-2.1 license
Activity

Stars

6 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.