public class Geoip2Handler extends Object implements Ip2RegionOfflineHandler
| 构造器和说明 |
|---|
Geoip2Handler(String ip,
com.maxmind.geoip2.DatabaseReader reader) |
| 限定符和类型 | 方法和说明 |
|---|---|
AddressInfo |
getAddress()
获得详细地址
|
String |
getCity()
获得城市
|
String |
getCountry()
获得国家
|
Double |
getLatitude()
获得纬度
|
Double |
getLongitude()
获得经度
|
String |
getProvince()
获得省份
|
public Geoip2Handler(String ip, com.maxmind.geoip2.DatabaseReader reader)
public String getCountry() throws Exception
getCountry 在接口中 Ip2RegionOfflineHandlerExceptionpublic String getProvince() throws Exception
getProvince 在接口中 Ip2RegionOfflineHandlerExceptionpublic String getCity() throws Exception
getCity 在接口中 Ip2RegionOfflineHandlerExceptionpublic AddressInfo getAddress() throws Exception
getAddress 在接口中 Ip2RegionOfflineHandlerExceptionpublic Double getLongitude() throws Exception
getLongitude 在接口中 Ip2RegionOfflineHandlerExceptionpublic Double getLatitude() throws Exception
getLatitude 在接口中 Ip2RegionOfflineHandlerExceptionCopyright © 2023. All rights reserved.