public class IPResult extends Object
This class holds the complete set of fields that can be returned from
an IP2Location database lookup. The availability of each field depends
on the database type being used.
For high-level usage, prefer GeoLocation which is returned by
IP2LocationService.lookup(String). This class is primarily used
internally by the BIN file reader.
| Status | Meaning |
|---|---|
| OK | Query successful |
| EMPTY_IP_ADDRESS | IP address was null or empty |
| INVALID_IP_ADDRESS | IP address format was invalid |
| IP_ADDRESS_NOT_FOUND | IP not found in database |
| MISSING_FILE | Database file not loaded |
| IPV6_NOT_SUPPORTED | Database doesn't support IPv6 |
| DATABASE_ERROR | I/O error during query |
| Field | LITE Databases | Commercial |
|---|---|---|
| Country (short/long) | All | All |
| Region, City | DB3+ | DB3+ |
| Latitude, Longitude | DB5+ | DB5+ |
| ZIP Code | DB9+ | DB9+ |
| Timezone | DB11+ | DB11+ |
| ISP, Domain | - | Commercial only |
| ASN, AS | - | Commercial only |
This class is mutable and not thread-safe. Each query produces a new instance.
IP2Location.IPQuery(String),
GeoLocation| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Compares this result with another for equality.
|
String |
getAddressType()
Returns the address type.
|
String |
getAreaCode()
Returns the area code.
|
String |
getAS()
Returns the Autonomous System name.
|
String |
getASCIDR()
Returns the Autonomous System CIDR.
|
String |
getASDomain()
Returns the Autonomous System domain name.
|
String |
getASN()
Returns the Autonomous System Number.
|
String |
getASUsageType()
Returns the Autonomous System usage type.
|
String |
getCategory()
Returns the IAB category.
|
String |
getCity()
Returns the city name.
|
String |
getCountryLong()
Returns the full country name.
|
String |
getCountryShort()
Returns the ISO 3166-1 alpha-2 country code.
|
String |
getDistrict()
Returns the district name.
|
String |
getDomain()
Returns the domain name.
|
String |
getElevation()
Returns the elevation.
|
String |
getIDDCode()
Returns the IDD code.
|
String |
getIpAddress()
Returns the queried IP address.
|
String |
getISP()
Returns the ISP name.
|
Float |
getLatitude()
Returns the latitude.
|
Float |
getLongitude()
Returns the longitude.
|
String |
getMCC()
Returns the Mobile Country Code.
|
String |
getMNC()
Returns the Mobile Network Code.
|
String |
getMobileBrand()
Returns the mobile carrier brand name.
|
String |
getNetSpeed()
Returns the network speed category.
|
String |
getRegion()
Returns the region or state name.
|
String |
getStatus()
Returns the query status.
|
String |
getTimeZone()
Returns the timezone.
|
String |
getUsageType()
Returns the usage type.
|
String |
getWeatherStationCode()
Returns the weather station code.
|
String |
getWeatherStationName()
Returns the weather station name.
|
String |
getZipCode()
Returns the ZIP or postal code.
|
int |
hashCode()
Returns a hash code for this result.
|
String |
toString()
Returns a string representation of this result.
|
public String getIpAddress()
public String getStatus()
public String getCountryShort()
public String getCountryLong()
public String getRegion()
public String getCity()
public Float getLatitude()
public Float getLongitude()
public String getZipCode()
public String getTimeZone()
public String getISP()
public String getDomain()
public String getNetSpeed()
public String getIDDCode()
public String getAreaCode()
public String getMCC()
public String getMNC()
public String getMobileBrand()
public String getWeatherStationCode()
public String getWeatherStationName()
public String getElevation()
public String getUsageType()
public String getAddressType()
public String getCategory()
public String getDistrict()
public String getASN()
public String getAS()
public String getASDomain()
public String getASUsageType()
public String getASCIDR()
public String toString()
public int hashCode()
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© 2026 Mindus SARL. All rights reserved.