Here you can find the source of getUrlConnection(String urlString)
public static URLConnection getUrlConnection(String urlString) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.net.URL; import java.net.URLConnection; public class Main { public static URLConnection getUrlConnection(String urlString) throws IOException { URL url = new URL(urlString); URLConnection con = url.openConnection(); return con; }//w w w.ja v a 2s . c o m }