一行读取txt内容
String content = new String(Files.readAllBytes(Paths.get("ip.txt")));
String[] ips = content.split("\r\n");
txt内容如下:
10.11.12.13:8080
10.11.12.14:8080
10.11.12.15:8080
10.11.12.16:8080
一行读取txt内容
String content = new String(Files.readAllBytes(Paths.get("ip.txt")));
String[] ips = content.split("\r\n");
txt内容如下:
10.11.12.13:8080
10.11.12.14:8080
10.11.12.15:8080
10.11.12.16:8080