org.gudy.azureus2.plugins.utils
Class LocationProvider

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

public abstract class LocationProvider
extends 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()
           
 InputStream getCountryFlagForIP(InetAddress address, int size_index)
           
 int[][] getCountryFlagSizes()
          Array of [width, height] pairs, smallest to largest
 String getCountryNameForIP(InetAddress address, Locale locale)
           
 String getISO3166CodeForIP(InetAddress address)
           
abstract  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 String getProviderName()

getCapabilities

public abstract long getCapabilities()

hasCapability

public boolean hasCapability(long capability)

hasCapabilities

public boolean hasCapabilities(long capabilities)

getCountryNameForIP

public String getCountryNameForIP(InetAddress address,
                                  Locale locale)

getISO3166CodeForIP

public String getISO3166CodeForIP(InetAddress address)

getCountryFlagSizes

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

Returns:

getCountryFlagForIP

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

isDestroyed

public abstract boolean isDestroyed()