public class IP2Location extends Object
Example usage scenarios:
Requirements: Java SDK 1.4 or later
Copyright (c) 2002-2020 IP2Location.com
| Modifier and Type | Field and Description |
|---|---|
String |
IPDatabasePath
Sets the path for the BIN database (IPv4 BIN or IPv4+IPv6 BIN).
|
String |
IPLicensePath
Sets the path for the license key file.
|
boolean |
UseMemoryMappedFile
To use memory mapped file for faster queries, set to true.
|
| Constructor and Description |
|---|
IP2Location() |
| Modifier and Type | Method and Description |
|---|---|
void |
Close()
This function destroys the mapped bytes.
|
protected void |
finalize()
Deprecated.
|
IPResult |
IPQuery(String IPAddress)
This function to query IP2Location data.
|
void |
Open(String DBPath)
This function can be used to pre-load the BIN file.
|
void |
Open(String DBPath,
boolean UseMMF)
This function can be used to initialized the component with params and pre-load the BIN file.
|
public boolean UseMemoryMappedFile
public String IPDatabasePath
public String IPLicensePath
public void Open(String DBPath) throws IOException
IOExceptionpublic void Open(String DBPath, boolean UseMMF) throws IOException
IOExceptionpublic void Close()
protected void finalize()
throws Throwable
public IPResult IPQuery(String IPAddress) throws IOException
IPAddress - IP Address you wish to queryIOExceptionCopyright © 2017–2020. All rights reserved.