Class AutoClosableUtils
java.lang.Object
io.servicetalk.concurrent.internal.AutoClosableUtils
Utilities for
AutoCloseable
.-
Method Summary
Modifier and TypeMethodDescriptionstatic void
closeAndReThrow
(AutoCloseable closeable) CallAutoCloseable.close()
and re-throw any exception.static void
closeAndReThrowIoException
(AutoCloseable closeable) CallAutoCloseable.close()
and re-throw any exceptions as aIOException
.static void
closeAndReThrowUnchecked
(AutoCloseable closeable) Deprecated.
-
Method Details
-
closeAndReThrowUnchecked
Deprecated.CallAutoCloseable.close()
and re-throw any exceptions as an unchecked exception.- Parameters:
closeable
- The object to close.
-
closeAndReThrow
CallAutoCloseable.close()
and re-throw any exception.- Parameters:
closeable
- The object to close.
-
closeAndReThrowIoException
CallAutoCloseable.close()
and re-throw any exceptions as aIOException
.- Parameters:
closeable
- The object to close.- Throws:
IOException
- if an exception occurs duringAutoCloseable.close()
.
-
closeAndReThrow(AutoCloseable)
.