Java tutorial
//package com.java2s; import java.net.HttpURLConnection; public class Main { public static void disconnect(HttpURLConnection con) { if (con == null) { return; } try { con.disconnect(); } catch (Exception e) { } } }