Class CloseUtils

java.lang.Object
org.frankframework.util.CloseUtils

public class CloseUtils extends Object
  • Method Details

    • closeSilently

      public static void closeSilently(@Nullable AutoCloseable closeable)
      Safely close an AutoCloseable, logging but ignoring any exceptions thrown.
      Parameters:
      closeable - AutoCloseable to close. It is safe to pass null.
    • closeSilently

      public static void closeSilently(AutoCloseable... closeables)
      Safely close all AutoCloseables, logging but ignoring any exceptions thrown.
      Parameters:
      closeables - AutoCloseables to close. It is safe to pass null values.
    • closeSilently

      public static void closeSilently(@Nullable Collection<AutoCloseable> closeables)
      Safely close all AutoCloseables, logging but ignoring any exceptions thrown.
      Parameters:
      closeables - AutoCloseables to close. It is safe to pass null, or for the collection to contain null values.