title: Calculate CIDR from a given netmask - Java
body: <p>Is there a way to calculate a <code>CIDR</code>  given a <code>Sub net mask</code> using any <code>Java lib</code>/function/trick?? I have been looking for a while and all I can find is from  <code>CIDR -&gt; Netmask</code> and I need it the other way arround  <code>Netmask -&gt; CIDR</code> ... Im not that handy on <code>Java</code>, but im willing to read a lot =)  thnx guys</p>
  
  <p>PzP =) </p>