Java 网络连接超时处理 http://blog.csdn.net/quansheng2580/article/details/6484246
// 创建一个Http连接HttpURLConnection urlConn = (HttpURLConnection) url.openConnection();urlConn.setConnectTimeout(3000); urlConn.setReadTimeout(3000);