throws UnknownHostException { if (addr.length != 4 && addr.length != 16) throw new UnknownHostException("IP address has illegal length");  if (addr.length == 4)  return new Inet4Address(addr, null);  return new Inet6Address(addr, null);
throws UnknownHostException { return getByAddress(null, addr);
    public static InetAddress getByAddress(byte[] addr)            throws UnknownHostException {        if (addr.length != 4 && addr.length != 16)                throw new UnknownHostException("IP address has illegal length");        if (addr.length == 4)         //      return new Inet4Address(null,addr);                return new Inet4Address(addr, null);        return new Inet6Address(addr, null);        //    return new Inet6Address(null,addr);    }