public static int netmaskIntToPrefixLength(int netmask){
  return Integer.bitCount(netmask);
}

public static int netmaskIntToPrefixLength ( int netmask ) { return Integer . bitCount ( netmask ) ; }
convert a ipv4 netmask integer to a prefix length
