public final class AutoCloseables extends Object
AutoCloseable objects.| Modifier and Type | Class and Description |
|---|---|
static class |
AutoCloseables.ParquetCloseResourceException |
| Modifier and Type | Method and Description |
|---|---|
static void |
close(AutoCloseable... autoCloseables)
Invokes the
AutoCloseable.close() method of each specified objects in a way that guarantees that all the
methods will be invoked even if an exception is occurred before. |
static void |
close(Iterable<? extends AutoCloseable> autoCloseables)
Invokes the
AutoCloseable.close() method of each specified objects in a way that guarantees that all the
methods will be invoked even if an exception is occurred before. |
static void |
uncheckedClose(AutoCloseable... autoCloseables)
Works similarly to
close(Iterable) but it wraps the thrown exception (if any) into a
AutoCloseables.ParquetCloseResourceException. |
static void |
uncheckedClose(Iterable<? extends AutoCloseable> autoCloseables)
Works similarly to
close(Iterable) but it wraps the thrown exception (if any) into a
AutoCloseables.ParquetCloseResourceException. |
public static void close(Iterable<? extends AutoCloseable> autoCloseables) throws Throwable
AutoCloseable.close() method of each specified objects in a way that guarantees that all the
methods will be invoked even if an exception is occurred before. It also gracefully handles null
AutoCloseable instances by skipping them.public static void close(AutoCloseable... autoCloseables) throws Throwable
AutoCloseable.close() method of each specified objects in a way that guarantees that all the
methods will be invoked even if an exception is occurred before. It also gracefully handles null
AutoCloseable instances by skipping them.public static void uncheckedClose(Iterable<? extends AutoCloseable> autoCloseables) throws AutoCloseables.ParquetCloseResourceException
close(Iterable) but it wraps the thrown exception (if any) into a
AutoCloseables.ParquetCloseResourceException.public static void uncheckedClose(AutoCloseable... autoCloseables)
close(Iterable) but it wraps the thrown exception (if any) into a
AutoCloseables.ParquetCloseResourceException.Copyright © 2023 The Apache Software Foundation. All rights reserved.