Here you can find the source of close(final URLConnection conn)
public static void close(final URLConnection conn)
//package com.java2s; //License from project: Apache License import java.net.HttpURLConnection; import java.net.URLConnection; public class Main { public static void close(final URLConnection conn) { if (conn instanceof HttpURLConnection) { ((HttpURLConnection) conn).disconnect(); }/*from w ww. j ava 2 s .c o m*/ } }