Package io.airlift.testing
Class Closeables
- java.lang.Object
-
- io.airlift.testing.Closeables
-
public final class Closeables extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidcloseAll(Closeable... closeables)static voidcloseAll(AutoCloseable... closeables)static voidcloseAllRuntimeException(Closeable... closeables)static <T extends Throwable>
TcloseAllSuppress(T rootCause, AutoCloseable... closeables)static voidcloseQuietly(Closeable... closeables)Deprecated.Usage of this method is discouraged, as it may hide real problems.
-
-
-
Method Detail
-
closeQuietly
@Deprecated public static void closeQuietly(Closeable... closeables)
Deprecated.Usage of this method is discouraged, as it may hide real problems. UsecloseAll(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)
-
-