获取Http URL连接
//package com.nowjava; import java.io.IOException; /*来自 NowJava.com*/ import java.net.HttpURLConnection; import java.net.URL; public class Main { public static void main(String[] argv) throws Exception { String strUrl = "nowjava.com"; System.out.println(getHttpURLConnection(strUrl)); } /** from * 时代Java - nowjava.com **/ public static HttpURLConnection getHttpURLConnection(String strUrl) throws IOException { URL url = new URL(strUrl);