public final class Closer extends Object
Modifier and Type | Method | Description |
---|---|---|
static void |
close(AutoCloseable closeable) |
Closes an AutoCloseable or ignores if
null . |
static boolean |
closeSilently(AutoCloseable closeable) |
Closes an AutoCloseable and returns
true if it closed without exception. |
public static void close(AutoCloseable closeable) throws Exception
null
.closeable
- the resource to close; may be nullException
- if the resource cannot be closedpublic static boolean closeSilently(AutoCloseable closeable)
true
if it closed without exception.closeable
- the resource to close; may be nullCopyright © 1999-2018. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.