Closes a Closeable.

@param closeable Closeable to close. If closeable is null then method just returns.
186434
public static void safeClose(@Nullable Closeable closeable) {
        if (closeable == null) return;

        try {
            closeable.close();
        } catch (IOException ignored) {
            // We made out best effort to release this resource. Nothing more we can do.
        }
    }
1266394
public static void closeQuietly(final JarFile aJarFile) {
        if (aJarFile != null) {
            try {
                aJarFile.close();
            } catch (final IOException details) {
                LOGGER.error(details.getMessage(), details);
            }
        }
    }
81551
public static void close(final HttpResponse response) {
        if (response instanceof CloseableHttpResponse) {
            val closeableHttpResponse = (CloseableHttpResponse) response;
            try {
                closeableHttpResponse.close();
            } catch (final IOException e) {
                LOGGER.error(e.getMessage(), e);
            }
        }
    }
23246
public static void closeQuietly(Closeable... cloasebales) {
        if (cloasebales != null) {
            for (Closeable c : cloasebales) {
                try {
                    if (c != null) {
                        c.close();
                    }
                } catch (IOException ex) {
                    //ignore
                }
            }
        }
    }
258723
@Override
  public void close() {
    try {
      closeFunction.close(resource);
    } catch (Exception e) {
      Exceptions.throwChecked(e);
    }
  }
1016541
public static void close(Closeable a) {
        try {
            if (a != null) {
                a.close();
            }
        } catch (Exception e) {
            throw wrap(e);
        }
    }
1270565
static void close(boolean delete) {
        if (openedFile != null) {
            out.close();
            out = System.err;

            if (delete) {
                openedFile.delete();
            }
        }
    }
481183
public static void closeWithWarn(Closeable closeable) {
        if (BeanUtil.nonNull(closeable)) {
            try {
                closeable.close();
            } catch (IOException e) {
                LOG.warn("关闭流出错......", e);
            }
        }
    }
471804
public static Closeable closeableFrom(@WillNotClose @Nullable final Connection connection) {
        return closeableFrom(connection, Connection::close);
    }
1275549
public static void closeQuietly(Closeable closeable) {
    try {
      close(closeable, true);
    } catch (IOException e) {
      logger.log(Level.SEVERE, "IOException should not have been thrown.", e);
    }
  }
1348291
private static void close(Closeable closeable) {
		if (closeable != null) {
			try {
				closeable.close();
			} catch (IOException ignored) {
				logger.error("Failed to close output stream: "
						+ ignored.getMessage());
			}
		}
	}
174129
@Override
    public void close() {
        if (params != null && params.closeHandler != null) {
            params.closeHandler.run();
            params.closeHandler = null;
        }
    }
1009779
public static void closeSilently(Closeable closeable) {
    try {
      if(closeable != null) {
        closeable.close();
      }
    }
    catch(IOException ignore) {
      LOG.debugCloseException(ignore);
    }
  }
287947
protected final void addCloseableInternal(Closeable closeable, T metaData) {
		synchronized (getSynchronizationLock()) {
			closeableToRef.put(closeable, metaData);
		}
	}
207194
static <T> CloseableIterator<T> wrap(final Iterator<T> iterator, final AutoCloseable closeable) {
        return new CloseableIterator<T>() {

            @Override
            public void close() {
                try {
                    closeable.close();
                } catch (RuntimeException re) {
                    throw re;
                } catch (Exception e) {
                    throw new IllegalStateException(e);
                }
            }

            @Override
            public boolean hasNext() {
                return iterator.hasNext();
            }

            @Override
            public T next() {
                return iterator.next();
            }

            @Override
            public void remove() {
                iterator.remove();
            }
        };
    }
1221607
public static void closeQuietly(Closeable closeable) {
        try {
            if (closeable != null) {
                closeable.close();
            }
        } catch (IOException e) {
            LOGGER.log(Level.FINE, e.getMessage(), e);
        }
    }
953836
protected void closeQuietly(Closeable closeable) {
    if (closeable == null) {
      return;
    }
    try {
      closeable.close();
    } catch (Exception t) {
      HTTP_LOGGER.warn("Unable to close {}: ", closeable, t);
    }
  }