List of utility methods to do HTTP Close
void | close(final URLConnection conn) close if (conn instanceof HttpURLConnection) { ((HttpURLConnection) conn).disconnect(); |
void | close(java.net.HttpURLConnection hconn) close if (hconn != null) try { hconn.disconnect(); } catch (Exception e) { |
void | close(URLConnection conn) Closes a URLConnection. if (conn instanceof HttpURLConnection) { ((HttpURLConnection) conn).disconnect(); |
URLConnection | close(URLConnection connection) Closes a given URL connection, if necessary. if (connection instanceof HttpURLConnection) { ((HttpURLConnection) connection).disconnect(); return null; |
void | closeAll(HttpURLConnection httpURLConnection, Writer writer, OutputStream outputStream) close All if (httpURLConnection != null) { httpURLConnection.disconnect(); if (outputStream != null) { outputStream.close(); if (writer != null) { writer.close(); ... |
void | closeConnection(final HttpURLConnection connection) close Connection if (connection != null) {
connection.disconnect();
|
void | closeHttpUrlConnectionNoException(HttpURLConnection... closeables) close Http Url Connection No Exception if (closeables != null) { for (HttpURLConnection cl : closeables) { try { cl.disconnect(); } catch (Exception ioe) { |
void | closeQuietly(HttpURLConnection connection) Closes all streams of the connection, and disconnects it. try { connection.disconnect(); } catch (Exception e) { try { connection.getInputStream().close(); } catch (Exception e) { try { connection.getOutputStream().close(); } catch (Exception e) { try { connection.getErrorStream().close(); } catch (Exception e) { |
void | closeQuietly(HttpURLConnection connection, Reader reader) close Quietly if (connection != null) { try { connection.disconnect(); } catch (Exception ignored) { try { if (reader != null) { ... |
void | closeQuietly(URLConnection cnn) close Quietly if (cnn == null) { return; } else if (cnn instanceof HttpURLConnection) { ((HttpURLConnection) cnn).disconnect(); } else { |