Top Description Constructors Methods
ch.qos.logback.core.util

public Class CloseUtil

extends Object
Class Inheritance
Imports
java.io.Closeable, .IOException, java.net.ServerSocket, .Socket

Static utility method for Closeable objects.
Author
Carl Harris

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
closeQuietly(Closeable
the socket to close
closeable
)

Closes a closeable while suppressing any IOException that occurs.

public static void
closeQuietly(Socket
the socket to close
socket
)

Closes a socket while suppressing any IOException that occurs.

public static void
closeQuietly(ServerSocket
the socket to close
serverSocket
)

Closes a server socket while suppressing any IOException that occurs.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

CloseUtilback to summary
public CloseUtil()

Method Detail

closeQuietlyback to summary
public static void closeQuietly(Closeable closeable)

Closes a closeable while suppressing any IOException that occurs.

Parameters
closeable:Closeable

the socket to close

closeQuietlyback to summary
public static void closeQuietly(Socket socket)

Closes a socket while suppressing any IOException that occurs.

Parameters
socket:Socket

the socket to close

closeQuietlyback to summary
public static void closeQuietly(ServerSocket serverSocket)

Closes a server socket while suppressing any IOException that occurs.

Parameters
serverSocket:ServerSocket

the socket to close