no.ntnu.vegare.visualizer.client.utils
Class GeoIP

java.lang.Object
  extended by no.ntnu.vegare.visualizer.client.utils.GeoIP

public class GeoIP
extends java.lang.Object

Interface to MaxMind GeoIP ( http://www.maxmind.com/app/java), which is a database of IP address to location relationships.

The file is located in the folder geoip/GeoIPCity.dat, and can be updated from MaxMind's websites when new versions are released.

Author:
vegare

Constructor Summary
GeoIP()
           
 
Method Summary
static com.maxmind.geoip.Location ipToPoint(java.net.InetAddress ip)
          Convert an IP address to a physical location.
static com.maxmind.geoip.Location ipToPoint(java.lang.String ip)
          Convert an IP address to a physical location
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoIP

public GeoIP()
Method Detail

ipToPoint

public static com.maxmind.geoip.Location ipToPoint(java.net.InetAddress ip)
Convert an IP address to a physical location.

Parameters:
ip - IP address
Returns:
Location instance

ipToPoint

public static com.maxmind.geoip.Location ipToPoint(java.lang.String ip)
Convert an IP address to a physical location

Parameters:
ip - IP address string on dot-notation form
Returns:
Location instance