Here you can find the source of getHttpURLConnection(String strUrl)
public static HttpURLConnection getHttpURLConnection(String strUrl) throws IOException
//package com.java2s; //License from project: Apache License import java.io.*; import java.net.HttpURLConnection; import java.net.URL; public class Main { public static HttpURLConnection getHttpURLConnection(String strUrl) throws IOException { URL url = new URL(strUrl); HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection(); return httpURLConnection; }/* www .j av a2 s . c o m*/ }