获取Inet套接字地址
/*N o w J a v a . c o m 提供*/ //package com.nowjava; import java.net.InetSocketAddress; import java.util.ArrayList; import java.util.List; public class Main { public static void main(String[] argv) throws Exception { String address = "nowjava.com"; System.out.println(getInetSocketAddress(address)); } public static List<InetSocketAddress> getInetSocketAddress( String address) { List<InetSocketAddress> inetSocketAddresses = new ArrayList<InetSocketAddress>(); String[] addresses = address.split(","); for (String dress : addresses) { String[] hosts = dress.split(":"); inetSocketAddr