Package com.biglybt.pif.utils
Class LocationProvider
- java.lang.Object
-
- com.biglybt.pif.utils.LocationProvider
-
public abstract class LocationProvider extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static long
CAP_COUNTRY_BY_IP
static long
CAP_COUNTY_BY_IP
static long
CAP_FLAG_BY_CC
static long
CAP_FLAG_BY_IP
static long
CAP_ISO3166_BY_IP
-
Constructor Summary
Constructors Constructor Description LocationProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract long
getCapabilities()
java.io.InputStream
getCountryFlagForIP(java.net.InetAddress address, int size_index)
java.io.InputStream
getCountryFlagForISO3166Code(java.lang.String cc, int size_index)
int[][]
getCountryFlagSizes()
Array of [width, height] pairs, smallest to largestjava.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()
-
-
-
Field Detail
-
CAP_COUNTY_BY_IP
public static final long CAP_COUNTY_BY_IP
- See Also:
- Constant Field Values
-
CAP_COUNTRY_BY_IP
public static final long CAP_COUNTRY_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
-
CAP_FLAG_BY_CC
public static final long CAP_FLAG_BY_CC
- See Also:
- Constant Field Values
-
-
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:
-
getCountryFlagForISO3166Code
public java.io.InputStream getCountryFlagForISO3166Code(java.lang.String cc, int size_index)
-
isDestroyed
public abstract boolean isDestroyed()
-
-