Here you can find the source of closeConnection(final HttpURLConnection connection)
public static void closeConnection(final HttpURLConnection connection)
//package com.java2s; //License from project: Apache License import java.net.HttpURLConnection; public class Main { public static void closeConnection(final HttpURLConnection connection) { if (connection != null) { connection.disconnect();//from w ww . j a v a2s .co m } } }