code: public static int ipv4ToInt( final Inet4Address    addr )
      {
          int    value = 0;
  
          for( byte    chunk : addr.getAddress() )
          {
              value <<= 8;
              value |= chunk & 0xff;
          }
  
          return value;
      }
docs: Turns an Inet4Address into a 32-bit integer representation
  @param addr address
  @return integer representation