Here you can find the source of getHttpConnection(URL url)
private static HttpURLConnection getHttpConnection(URL url) throws IOException
//package com.java2s; //License from project: Open Source License import java.net.URL; import java.net.HttpURLConnection; import java.io.*; public class Main { private static HttpURLConnection getHttpConnection(URL url) throws IOException { return (HttpURLConnection) url.openConnection(); }/*w w w .ja v a2 s . c o m*/ }