Package org.javlo.service.location
Class LocationService
- java.lang.Object
-
- org.javlo.service.location.LocationService
-
public class LocationService extends Object
-
-
Constructor Summary
Constructors Constructor Description LocationService()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IpPosition
getIpPosition(String ip)
static Location
getLocation(double longitude, double latitude, String lg)
static Location
getLocation(String coord, String lg)
static void
init(javax.servlet.ServletContext application)
static long
ipToLong(String ipStr)
static void
main(String[] args)
-
-
-
Field Detail
-
ipDbFile
public static File ipDbFile
-
-
Method Detail
-
main
public static void main(String[] args) throws MalformedURLException, IOException
- Throws:
MalformedURLException
IOException
-
init
public static void init(javax.servlet.ServletContext application) throws MalformedURLException, IOException
- Throws:
MalformedURLException
IOException
-
getLocation
public static Location getLocation(double longitude, double latitude, String lg) throws IOException
- Throws:
IOException
-
ipToLong
public static long ipToLong(String ipStr) throws UnknownHostException
- Throws:
UnknownHostException
-
getLocation
public static Location getLocation(String coord, String lg) throws IOException
- Throws:
IOException
-
getIpPosition
public static IpPosition getIpPosition(String ip) throws com.google.gson.JsonSyntaxException, MalformedURLException, Exception
- Throws:
com.google.gson.JsonSyntaxException
MalformedURLException
Exception
-
-