code: public static long addressToLong(InetAddress address) {
          long result = 0;
          for (byte element : address.getAddress()) {
              result = (result << 8) + unsign(element);
          }
          return result;
      }
docs: Converts the bytes that make up an internet address into the corresponding integer value to make
  it easier to perform bit-masking operations on them.
  
  @param address an address whose integer equivalent is desired
  
  @return the integer corresponding to that address