ch.qos.logback.core.util
Class CloseUtil

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

public class CloseUtil
extends Object

Static utility method for Closeable objects.

Author:
Carl Harris

Constructor Summary
CloseUtil()
           
 
Method Summary
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 Detail

CloseUtil

public CloseUtil()
Method Detail

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


Copyright © 2005-2013 QOS.ch. All Rights Reserved.