title: Apache-commons-net Illegal (yet legal) CIDR notation
body: <p>I need the ability to work with CIDR notation in Java.</p>
  
  <p>I found the commons library SubnetUtils.</p>
  
  <p>When I try to use a CIDR of 10.10.0.0/22, as an example I get the following</p>
  
  <p><code>Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Could not parse [10.10.0.0]
      at org.apache.commons.net.util.SubnetUtils.calculate(SubnetUtils.java:240)
      at org.apache.commons.net.util.SubnetUtils.&lt;init&gt;(SubnetUtils.java:52)</code></p>
  
  <p>The code that is calling is:</p>
  
  <p><code>SubnetUtils subnetUtils = new SubnetUtils(cidrNotation);
   SubnetInfo info = subnetUtils.getInfo();
  </code></p>
  
  <p>I see that SubnetUtils is checking the bits to see if the mask is valid. </p>
  
  <p>`   From SubnetUtils.java</p>
  
  <pre><code> private void calculate(String mask) {
      Matcher matcher = cidrPattern.matcher(mask);
  
      if (matcher.matches()) {
          address = matchAddress(matcher);
  
          /* Create a binary netmask from the number of bits specification /x */
          int cidrPart = rangeCheck(Integer.parseInt(matcher.group(5)), 0, NBITS);
          for (int j = 0; j &lt; cidrPart; ++j) {
              netmask |= (1 &lt;&lt; 31-j);
          }
  
          /* Calculate base network address */
          network = (address &amp; netmask);
  
          /* Calculate broadcast address */
          broadcast = network | ~(netmask);
      } else {
          throw new IllegalArgumentException("Could not parse [" + mask + "]");
      }
  </code></pre>
  
  <p>`</p>
  
  <p>I realize 10.0.0.0/8 is a class A, but I should legally be able to chop it into smaller pieces.</p>
  
  <p>Is there a way around this?  A better Utility?  Or am I stuck rewriting SubnetUtils?</p>