Package ch.qos.logback.core.util

# 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 Summary

Constructors
Constructor
Description
`CloseUtil()`

## Method Summary

Modifier and Type
Method
Description
`static void`
`closeQuietly(Closeable closeable)`
Closes a closeable while suppressing any `IOException` that occurs.
`static void`
`closeQuietly(ServerSocket serverSocket)`
Closes a server socket while suppressing any `IOException` that occurs.
`static void`
`closeQuietly(Socket socket)`
Closes a socket while suppressing any `IOException` that occurs.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### CloseUtil

public CloseUtil()

## 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