public boolean isWithinRange(InetAddress addr,String category){
  for (  NetMask mask : getCategoryRanges(category))   if (mask.isWithinMask(addr))   return true;
  return false;
}

public boolean isWithinRange ( InetAddress addr , String category ) { for ( NetMask mask : getCategoryRanges ( category ) ) if ( mask . isWithinMask ( addr ) ) return true ; return false ; }
checks whether the given address is within any network mask for the given category .
