package com.fuzamei.util;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
/**
 * 
* @file_name: URLUtil.java
* @Description: TODO 发送链接
* @author: Ma Amin
* @date: 2017-11-19 下午6:14:48 
* @version 1.0
 */
public class URLUtil {
	/**
	 * 
	* @Title: sendUrl
	* @Description: TODO(这里用一句话描述这个方法的作用)
	* @param @param url
	* @param @return
	* @param @throws Exception	设定文件
	* @return String	返回类型
	* @throws
	 */
	public static String sendUrl(String url) throws Exception{
		String result = "";
		URL U = new URL(url);  
		URLConnection connection = U.openConnection();  
		   connection.connect();  
		   BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream(),"utf-8"));  
		   String line;  
		   while ((line = in.readLine())!= null)  
		   {  
		    result += line;  
		   }  
		   in.close();
		   return result;
	}
}