Given a CIDR address, e.g. 192.168.10.0/24
24)255.255.
Following Yuriy's answer: To get the whole range of ip addresses, the Apache Java class SubnetUtils offers the following methods:
String[] addresses = utils.getInfo().getAllAddresses();
To download the jar containing the class go to: http://repo1.maven.org/maven2/commons-net/commons-net/3.0.1/commons-net-3.0.1.jar
The source code: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SubnetUtils.java?view=markup
Maven id:
commons-net commons-net3.0.1