We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f515445 commit 65cb55bCopy full SHA for 65cb55b
1 file changed
IPExt.java
@@ -35,6 +35,20 @@ public static void load(String filename) {
35
watch();
36
}
37
38
+
39
+ public static void load(String filename, boolean strict) throws Exception {
40
+ ipFile = new File(filename);
41
+ if (strict) {
42
+ int contentLength = Long.valueOf(ipFile.length()).intValue();
43
+ if (contentLength < 512 * 1024) {
44
+ throw new Exception("ip data file error.");
45
+ }
46
47
+ load();
48
+ if (enableFileWatch) {
49
+ watch();
50
51
52
53
public static String[] find(String ip) {
54
String[] ips = ip.split("\\.");
0 commit comments