private void closeConnection(HttpURLConnection connection){
  if (connection != null) {
    connection.disconnect();
  }
}

private void closeConnection ( HttpURLConnection connection ) { if ( connection != null ) { connection . disconnect ( ) ; } }
closes a http url connection
