Class Closeables


  • public final class Closeables
    extends java.lang.Object
    This class contains utility-methods for instances of AutoCloseable.
    Author:
    cmerkel
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void closeQuietly​(java.lang.AutoCloseable autoCloseable)
      Closes the provided AutoCloseable.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • closeQuietly

        public static void closeQuietly​(java.lang.AutoCloseable autoCloseable)
        Closes the provided AutoCloseable. Exceptions that might occur will be caught and logged at error-level. If autoCloseable is null, this method does nothing.
        Parameters:
        autoCloseable - the AutoCloseable to close