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 IpPositiongetIpPosition(String ip)static LocationgetLocation(double longitude, double latitude, String lg)static LocationgetLocation(String coord, String lg)static voidinit(javax.servlet.ServletContext application)static longipToLong(String ipStr)static voidmain(String[] args)
-
-
-
Field Detail
-
ipDbFile
public static File ipDbFile
-
-
Method Detail
-
main
public static void main(String[] args) throws MalformedURLException, IOException
- Throws:
MalformedURLExceptionIOException
-
init
public static void init(javax.servlet.ServletContext application) throws MalformedURLException, IOException- Throws:
MalformedURLExceptionIOException
-
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.JsonSyntaxExceptionMalformedURLExceptionException
-
-