Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A java library to read QQWry IP database. (纯真IP地址数据库)

License

NotificationsYou must be signed in to change notification settings

jarod/qqwry-java

Repository files navigation

Build StatusJavadocs

usage:

Code sample:

QQWryqqwry =newQQWry();// load qqwry.dat from classpathQQWryqqwry =newQQWry(Paths.get("path/to/qqwry.dat"));// load qqwry.dat from java.nio.file.Pathbyte[]data =Files.readAllBytes(Paths.get("path/to/qqwry.dat"));QQWryqqwry =newQQWry(data);// create QQWry with provided dataStringdbVer =qqwry.getDatabaseVersion();System.out.printf("qqwry.dat version=%s",dbVer);// qqwry.dat version=2021.08.11StringmyIP ="127.0.0.1";IPZoneipzone =qqwry.findIP(myIP);System.out.printf("%s, %s",ipzone.getMainInfo(),ipzone.getSubInfo());// IANA, 保留地址用于本地回送

Gradle:

dependencies {   api ("com.github.jarod:qqwry-java:0.10.+",   )}

Maven:

<dependency>  <groupId>com.github.jarod</groupId>  <artifactId>qqwry-java</artifactId>  <version>0.10.1</version></dependency>

build:

# OPTIONAL To embed qqwry.dat in the jar file, copy qqwry.dat to src/main/resources/qqwry.dat# jar file will out put as ./build/lib/qqwry-java-X.X.X.jar./gradlew jar

About

A java library to read QQWry IP database. (纯真IP地址数据库)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp