28 lines
966 B
Java
28 lines
966 B
Java
package okhttp3;
|
|
|
|
import java.net.InetAddress;
|
|
import java.net.UnknownHostException;
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public interface Dns {
|
|
public static final Dns SYSTEM = new Dns() { // from class: okhttp3.Dns.1
|
|
@Override // okhttp3.Dns
|
|
public List<InetAddress> lookup(String str) throws UnknownHostException {
|
|
if (str == null) {
|
|
throw new UnknownHostException("hostname == null");
|
|
}
|
|
try {
|
|
return Arrays.asList(InetAddress.getAllByName(str));
|
|
} catch (NullPointerException e) {
|
|
UnknownHostException unknownHostException = new UnknownHostException("Broken system behaviour for dns lookup of " + str);
|
|
unknownHostException.initCause(e);
|
|
throw unknownHostException;
|
|
}
|
|
}
|
|
};
|
|
|
|
List<InetAddress> lookup(String str) throws UnknownHostException;
|
|
}
|