Here you can find the source of close(java.net.HttpURLConnection hconn)
public final static void close(java.net.HttpURLConnection hconn)
//package com.java2s; import java.io.*; public class Main { public final static void close(InputStream in) { // Close the input stream, ignoring errors. if (in != null) try { in.close();/*from w w w.ja v a 2s.c o m*/ } catch (IOException e) { } } public final static void close(OutputStream out) { // Close the output stream, ignoring errors. try { if (out != null) out.close(); } catch (IOException e) { } } public final static void close(Writer out) { // Close the writer, ignoring errors. if (out != null) try { out.close(); } catch (IOException e) { } } public final static void close(Reader in) { // Close the reader, ignoring errors. if (in != null) try { in.close(); } catch (IOException e) { } } public final static void close(java.net.Socket socket) { // Close the socket, ignoring errors. if (socket != null) try { socket.close(); } catch (IOException e) { } } public final static void close(java.net.ServerSocket socket) { // Close the socket, ignoring errors. if (socket != null) try { socket.close(); } catch (IOException e) { } } public final static void close(java.net.HttpURLConnection hconn) { if (hconn != null) try { hconn.disconnect(); } catch (Exception e) { } } }