https://github.com/seancfoley/IPAddress
<dependency>
<groupId>com.github.seancfoley</groupId>
<artifactId>ipaddress</artifactId>
<version>5.3.4</version>
</dependency>
IPAddress address = new IPAddressString("192.168.0.0/24").getAddress().toPrefixBlock();标签:IPAddressString,判断,ip,System,address,println,cidr,IPAddress,out From: https://www.cnblogs.com/xiamingqing/p/16720150.html
IPAddress address3= new IPAddressString("192.168.0.0").getAddress();
IPAddress address2 = new IPAddressString("192.168.1.1/24").getAddress().toPrefixBlock();
System.out.println(address.getSection().getLower());
System.out.println(address.getSection().getUpper());
System.out.println(address.contains(address2)); ;
System.out.println(address.contains(address3)); ;