Class CloseUtil

java.lang.Object
ch.qos.logback.core.util.CloseUtil

public class CloseUtil extends Object
Static utility method for Closeable objects.
Author:
Carl Harris
  • Constructor Details

  • Method Details

    • closeQuietly

      public static void closeQuietly(Closeable closeable)
      Closes a closeable while suppressing any IOException that occurs.
      Parameters:
      closeable - the socket to close
    • closeQuietly

      public static void closeQuietly(Socket socket)
      Closes a socket while suppressing any IOException that occurs.
      Parameters:
      socket - the socket to close
    • closeQuietly

      public static void closeQuietly(ServerSocket serverSocket)
      Closes a server socket while suppressing any IOException that occurs.
      Parameters:
      serverSocket - the socket to close