org.gudy.azureus2.plugins.utils
Class LocationProvider

java.lang.Object
  extended by org.gudy.azureus2.plugins.utils.LocationProvider

public abstract class LocationProvider
extends java.lang.Object


Field Summary
static long CAP_COUNTY_BY_IP
           
static long CAP_FLAG_BY_IP
           
static long CAP_ISO3166_BY_IP
           
 
Constructor Summary
LocationProvider()
           
 
Method Summary
abstract  long getCapabilities()
           
 java.io.InputStream getCountryFlagForIP(java.net.InetAddress address, int size_index)
           
 int[][] getCountryFlagSizes()
          Array of [width, height] pairs, smallest to largest
 java.lang.String getCountryNameForIP(java.net.InetAddress address, java.util.Locale locale)
           
 java.lang.String getISO3166CodeForIP(java.net.InetAddress address)
           
abstract  java.lang.String getProviderName()
           
 boolean hasCapabilities(long capabilities)
           
 boolean hasCapability(long capability)
           
abstract  boolean isDestroyed()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CAP_COUNTY_BY_IP

public static final long CAP_COUNTY_BY_IP
See Also:
Constant Field Values

CAP_ISO3166_BY_IP

public static final long CAP_ISO3166_BY_IP
See Also:
Constant Field Values

CAP_FLAG_BY_IP

public static final long CAP_FLAG_BY_IP
See Also:
Constant Field Values
Constructor Detail

LocationProvider

public LocationProvider()
Method Detail

getProviderName

public abstract java.lang.String getProviderName()

getCapabilities

public abstract long getCapabilities()

hasCapability

public boolean hasCapability(long capability)

hasCapabilities

public boolean hasCapabilities(long capabilities)

getCountryNameForIP

public java.lang.String getCountryNameForIP(java.net.InetAddress address,
                                            java.util.Locale locale)

getISO3166CodeForIP

public java.lang.String getISO3166CodeForIP(java.net.InetAddress address)

getCountryFlagSizes

public int[][] getCountryFlagSizes()
Array of [width, height] pairs, smallest to largest

Returns:

getCountryFlagForIP

public java.io.InputStream getCountryFlagForIP(java.net.InetAddress address,
                                               int size_index)
Parameters:
address -
size_index - - index in getCountryFlagSizes response of desired size
Returns:

isDestroyed

public abstract boolean isDestroyed()