Class Closeables

java.lang.Object
io.airlift.testing.Closeables

public final class Closeables extends Object
  • Method Details

    • closeQuietly

      @Deprecated public static void closeQuietly(Closeable... closeables)
      Deprecated.
      Usage of this method is discouraged, as it may hide real problems. Use closeAll(Closeable...) instead and, if necessary, suppress exceptions explicitly.
    • closeAll

      public static void closeAll(Closeable... closeables) throws IOException
      Throws:
      IOException
    • closeAll

      public static void closeAll(AutoCloseable... closeables) throws Exception
      Throws:
      Exception
    • closeAllRuntimeException

      public static void closeAllRuntimeException(Closeable... closeables)
    • closeAllSuppress

      public static <T extends Throwable> T closeAllSuppress(T rootCause, AutoCloseable... closeables)