code: public static byte[]
      toByteArray(String s, int family) {
          if (family == IPv4)
              return parseV4(s);
          else if (family == IPv6)
              return parseV6(s);
          else
              throw new IllegalArgumentException("unknown address family");
      }
docs: Convert a string containing an IP address to an array of 4 or 16 bytes.
  
  @param s      The address, in text format.
  @param family The address family.
  @return The address