static InetSocketAddress validateAddress(SocketAddress socketAddress) {
if (null == socketAddress) {
throw new IllegalArgumentException();
}
if (!(socketAddress instanceof InetSocketAddress)) {
throw new UnsupportedAddressTypeException();
}
InetSocketAddress inetSocketAddress = (InetSocketAddress) socketAddress;
if (inetSocketAddress.isUnresolved()) {
throw new UnresolvedAddressException();
}