Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

143 changes: 0 additions & 143 deletions IP.java

This file was deleted.

26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
java
====
# General Info

17mon IP库解析代码
This project includes a brief summary of code review in a Java repository forked
from a GitHub public repository.
This code was developed 7 years ago and includes a base code in Java version 4 that
works in J2SE 1.4.
As part of our project, we will be focusing on features of clean code:
1. Documentation: Repository being old has no underlying description. Project demands
navigation through class to understand its purpose. We will be adding comments and
documentation for enhanced readability.
2. Refactor: Base code requires immense refactoring to include good coding practices.
Issues of naming conventions (meaningful names), refactoring methods (functions),
formatting and error handling will be closed.

##基本用法
```java

IP.enableFileWatch = true; // 默认值为:false,如果为true将会检查ip库文件的变化自动reload数据

IP.load("IP库本地绝对路径");

IP.find("8.8.8.8");//返回字符串数组["GOOGLE","GOOGLE"]

```

IPExt的用法与IP的用法相同,只是用来解析datx格式文件。
17 changes: 17 additions & 0 deletions README_author.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
java
====

17mon IP库解析代码

##基本用法
```java

IP.enableFileWatch = true; // 默认值为:false,如果为true将会检查ip库文件的变化自动reload数据

IP.load("IP库本地绝对路径");

IP.find("8.8.8.8");//返回字符串数组["GOOGLE","GOOGLE"]

```

IPExt的用法与IP的用法相同,只是用来解析datx格式文件。
8 changes: 8 additions & 0 deletions Readme_translation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
IP.enableFileWatch = true; // The default value is: false, if it is true, it will check the changes of the ip library file and automatically reload the data

IP.load("The local absolute path of the IP library");

IP.find("8.8.8.8");//Returns an array of strings ["GOOGLE","GOOGLE"]


The usage of IPExt is the same as that of IP, but it is used to parse datx format files.
30 changes: 30 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.example</groupId>
<artifactId>CodeReading</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.7.2</version>
<scope>test</scope>
</dependency>
</dependencies>

<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>

</project>
6 changes: 6 additions & 0 deletions src/main/java/Constants.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@


public class Constants {
public static final String IP_ADDRESS = "213.255.193.25";
public static boolean enableFileWatch = false;
}
Loading