Java 网络连接超时处理

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

你可能感兴趣的:(java)