Package ch.qos.logback.core.util
Class CloseUtil
- java.lang.Object
-
- ch.qos.logback.core.util.CloseUtil
-
public class CloseUtil extends java.lang.ObjectStatic utility method forCloseableobjects.
-
-
Constructor Summary
Constructors Constructor Description CloseUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcloseQuietly(java.io.Closeable closeable)Closes a closeable while suppressing anyIOExceptionthat occurs.static voidcloseQuietly(java.net.ServerSocket serverSocket)Closes a server socket while suppressing anyIOExceptionthat occurs.static voidcloseQuietly(java.net.Socket socket)Closes a socket while suppressing anyIOExceptionthat occurs.
-
-
-
Method Detail
-
closeQuietly
public static void closeQuietly(java.io.Closeable closeable)
Closes a closeable while suppressing anyIOExceptionthat occurs.- Parameters:
closeable- the socket to close
-
closeQuietly
public static void closeQuietly(java.net.Socket socket)
Closes a socket while suppressing anyIOExceptionthat occurs.- Parameters:
socket- the socket to close
-
closeQuietly
public static void closeQuietly(java.net.ServerSocket serverSocket)
Closes a server socket while suppressing anyIOExceptionthat occurs.- Parameters:
serverSocket- the socket to close
-
-