MaxMindDatabase class
A MaxMindDatabase is the dart equivalent of a mmdb-file.
Properties
- binary_format_major_version → int
-
no setter
- binary_format_minor_version → int
-
no setter
- binaryFormatMajorVersion → int
-
The major version of the specification this database uses.
final
- binaryFormatMinorVersion → int
-
The minor version of the specification this database uses.
final
- build_epoch → int
-
no setter
- buildEpoch → int
-
The database build timestamp as a Unix epoch value.
final
- data → DataProvider
-
The datasource of this database.
final
- database_type → String
-
no setter
- databaseType → String
-
The database type.
See specification.
final
-
description
→ Map<
String, String> -
A database description.
The codes may include additional information such as script or country identifiers,
like “zh-TW” or “mn-Cyrl-MN”.
The additional identifiers will be separated by a dash character (“-“).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- ip_version → int
-
no setter
- ipVersion → int
-
The IP version this database is for.
An v4 address can also be searched in a v6 database.
final
-
languages
→ List<
String> -
An list of locale codes.
A record may contain data items that have been localized to some or all of these locales.
Records should not contain localized data for locales not included in this array.
final
- node_count → int
-
no setter
- nodeCount → int
-
The number of nodes in the database.
final
- record_size → int
-
no setter
- recordSize → int
-
The size of each record in the database.
One node contains two records.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
calculateMask(
int length) → int -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
search(
String address) → Future -
Search the database for an ip
address
in String format. -
searchAddress(
InternetAddress address) → Future -
Search the database for an ip
address
that has been parsed to a InternetAddress. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
dataProvider(
DataProvider data) → Future< MaxMindDatabase> -
Create a
MaxMindDatabase
instance while getting thedata
from a DataProvider. -
decodeData(
DataProvider data, int position, int start) → Future< _Data> -
file(
File file) → Future< MaxMindDatabase> -
Create a
MaxMindDatabase
instance from a mmdb-file. -
memory(
Uint8List data) → Future< MaxMindDatabase> -
Create a
MaxMindDatabase
instance from the loadeddata
of an mmdb-file.