IP2Location™ for Java Client and database bin file.
IP2Location™ for Java Client and database bin file.
This site or product includes IP2Location LITE data available from http://www.ip2location.com
The repository code is based on ip2location repository.
Example: https://www.renfei.net/kitbox/ip
The update cycle of database bin file is once a month.
Database bin file:
net.renfei
ip2location
1.2.6
Compared with the official client, I removed the ip2locationweb service and the dependency on other libraries.
…| Name | Type | Description |
|---|---|---|
| ip_from | INT (10) / DECIMAL (39,0) | First IP address show netblock. |
| ip_to | INT (10) / DECIMAL (39,0) | Last IP address show netblock. |
| country_code | CHAR(2) | Two-character country code based on ISO 3166. |
| country_name | VARCHAR(64) | Country name based on ISO 3166. |
| region_name | VARCHAR(128) | Region or state name. |
| city_name | VARCHAR(128) | City name. |
| latitude | DOUBLE | City latitude. Default to capital city latitude if city is unknown. |
| longitude | DOUBLE | City longitude. Default to capital city longitude if city is unknown. |
| zip_code | VARCHAR(30) | ZIP/Postal code. |
| time_zone | VARCHAR(8) | UTC time zone (with DST supported). |
Below are the methods supported in this class.
| Method Name | Description |
|---|---|
| public boolean IsIPv4(String IPAddress) | Returns true if string contains an IPv4 address. Otherwise false. |
| public boolean IsIPv6(String IPAddress) | Returns true if string contains an IPv6 address. Otherwise false. |
| public BigInteger IPv4ToDecimal(String IPAddress) | Returns the IP number for an IPv4 address. |
| public BigInteger IPv6ToDecimal(String IPAddress) | Returns the IP number for an IPv6 address. |
| public String DecimalToIPv4(BigInteger IPNum) | Returns the IPv4 address for the supplied IP number. |
| public String DecimalToIPv6(BigInteger IPNum) | Returns the IPv6 address for the supplied IP number. |
| public String CompressIPv6(String IPAddress) | Returns the IPv6 address in compressed form. |
| public String ExpandIPv6(String IPAddress) | Returns the IPv6 address in expanded form. |
| public List IPv4ToCIDR(String IPFrom, String IPTo) | Returns a list of CIDR from the supplied IPv4 range. |
| public List IPv6ToCIDR(String IPFrom, String IPTo) | Returns a list of CIDR from the supplied IPv6 range. |
| public String[] CIDRToIPv4(String CIDR) | Returns the IPv4 range from the supplied CIDR. |
| public String[] CIDRToIPv6(String CIDR) | Returns the IPv6 range from the supplied CIDR. |
…No open issues yet, or sync has not completed.