importjava.io.File;importjava.io.FileNotFoundException;importjava.io.PrintStream;public classIPTest {public static voidmain(String[] args) {/*Long ip = getIp2long("10.0.35.120");
System.out.println("ip --> " +ip);
Long ip2 = getIp2long2("10.0.35.120");
System.out.println("ip2 --> " +ip2);*/fun1();
}public static longgetIp2long(String ip) {
ip=ip.trim();
String[] ips= ip.split("\\.");long ip2long = 0L;for (int i = 0; i < 4; ++i) {
ip2long= ip2long << 8 |Integer.parseInt(ips[i]);
}returnip2long;
}public static longgetIp2long2(String ip) {
ip=ip.trim();
String[] ips= ip.split("\\.");long ip1 = Integer.parseInt(ips[0]);long ip2 = Integer.parseInt(ips[1]);long ip3 = Integer.parseInt(ips[2]);long ip4 = Integ