public class QQWry extends Object
Usage:
QQWry qqwry = new QQWry(); // load qqwry.dat from classpath
QQWry qqwry = new QQWry(Paths.get("path/to/qqwry.dat")); // load qqwry.dat from java.nio.file.Path
byte[] data = Files.readAllBytes(Paths.get("path/to/qqwry.dat"));
QQWry qqwry = new QQWry(data); // create QQWry with provided data
String myIP = "127.0.0.1";
IPZone ipzone = qqwry.findIP(myIP);
System.out.printf("%s, %s", ipzone.getMainInfo(), ipzone.getSubInfo());
// IANA, 保留地址用于本地回送
public QQWry()
throws IOException
IOException - if encounter error while reading qqwry.datpublic QQWry(byte[] data)
data - fully read data from a qqwry.dat file.public QQWry(Path file) throws IOException
file - path to qqwry.datIOException - if encounter error while reading from the given file.Copyright © 2019. All rights reserved.