code: public static int
      familyOf(InetAddress address) {
          if (address instanceof Inet4Address)
              return IPv4;
          if (address instanceof Inet6Address)
              return IPv6;
          throw new IllegalArgumentException("unknown address family");
      }
docs: Returns the family of an InetAddress.
  
  @param address The supplied address.
  @return The family, either IPv4 or IPv6.