@Test public void test() { IpAddressUtil.convertNonSequentialBlock("192.168.1.0/24"); }
static void convertNonSequentialBlock(String string) { final IPAddressString addrString = new IPAddressString(string); final IPAddress addr = addrString.getAddress(); System.out.println("Initial range block is " + addr); System.out.println("Address is " + addr.toInetAddress().getHostAddress()); final BigInteger sequentialCount = addr.getCount(); System.out.println("Sequential is " + sequentialCount); final Iterable<? extends IPAddress> itr = addr.getIterable(); itr.forEach(System.out::println); final IPAddress lowerAddr = addr.getLower(); System.out.println("Lower Address is " + lowerAddr.toInetAddress().getHostAddress()); final IPAddress upperAddr = addr.getUpper(); System.out.println("Upper Address is " + upperAddr.toInetAddress().getHostAddress()); }
IpAddressUtil { static void convertNonSequentialBlock(String string) { final IPAddressString addrString = new IPAddressString(string); final IPAddress addr = addrString.getAddress(); System.out.println("Initial range block is " + addr); System.out.println("Address is " + addr.toInetAddress().getHostAddress()); final BigInteger sequentialCount = addr.getCount(); System.out.println("Sequential is " + sequentialCount); final Iterable<? extends IPAddress> itr = addr.getIterable(); itr.forEach(System.out::println); final IPAddress lowerAddr = addr.getLower(); System.out.println("Lower Address is " + lowerAddr.toInetAddress().getHostAddress()); final IPAddress upperAddr = addr.getUpper(); System.out.println("Upper Address is " + upperAddr.toInetAddress().getHostAddress()); } }
IpAddressUtil { static void convertNonSequentialBlock(String string) { final IPAddressString addrString = new IPAddressString(string); final IPAddress addr = addrString.getAddress(); System.out.println("Initial range block is " + addr); System.out.println("Address is " + addr.toInetAddress().getHostAddress()); final BigInteger sequentialCount = addr.getCount(); System.out.println("Sequential is " + sequentialCount); final Iterable<? extends IPAddress> itr = addr.getIterable(); itr.forEach(System.out::println); final IPAddress lowerAddr = addr.getLower(); System.out.println("Lower Address is " + lowerAddr.toInetAddress().getHostAddress()); final IPAddress upperAddr = addr.getUpper(); System.out.println("Upper Address is " + upperAddr.toInetAddress().getHostAddress()); }  }
IpAddressUtil { static void convertNonSequentialBlock(String string) { final IPAddressString addrString = new IPAddressString(string); final IPAddress addr = addrString.getAddress(); System.out.println("Initial range block is " + addr); System.out.println("Address is " + addr.toInetAddress().getHostAddress()); final BigInteger sequentialCount = addr.getCount(); System.out.println("Sequential is " + sequentialCount); final Iterable<? extends IPAddress> itr = addr.getIterable(); itr.forEach(System.out::println); final IPAddress lowerAddr = addr.getLower(); System.out.println("Lower Address is " + lowerAddr.toInetAddress().getHostAddress()); final IPAddress upperAddr = addr.getUpper(); System.out.println("Upper Address is " + upperAddr.toInetAddress().getHostAddress()); }   }
IpAddressUtil { static void convertNonSequentialBlock(String string) { final IPAddressString addrString = new IPAddressString(string); final IPAddress addr = addrString.getAddress(); System.out.println("Initial range block is " + addr); System.out.println("Address is " + addr.toInetAddress().getHostAddress()); final BigInteger sequentialCount = addr.getCount(); System.out.println("Sequential is " + sequentialCount); final Iterable<? extends IPAddress> itr = addr.getIterable(); itr.forEach(System.out::println); final IPAddress lowerAddr = addr.getLower(); System.out.println("Lower Address is " + lowerAddr.toInetAddress().getHostAddress()); final IPAddress upperAddr = addr.getUpper(); System.out.println("Upper Address is " + upperAddr.toInetAddress().getHostAddress()); }    }