org.dcm4che2.util
Class CloseUtils

java.lang.Object
  extended by org.dcm4che2.util.CloseUtils

public final class CloseUtils
extends java.lang.Object


Constructor Summary
CloseUtils()
           
 
Method Summary
static void safeClose(java.io.Closeable object)
          Safely close, absorbing exceptions and handling null graciously.
static void safeClose(javax.imageio.stream.ImageInputStream is)
          Safely close an ImageInputStream stream, absorbing exceptions and handling null graciously.
static void safeClose(java.net.ServerSocket socket)
          Safely close a server socket, absorbing exceptions and handling null graciously.
static void safeClose(java.net.Socket socket)
          Safely close a socket, absorbing exceptions and handling null graciously.
static void safeClose(java.sql.Statement statement)
          Safely close a JDBC Statement, absorbing exceptions and handling null graciously.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CloseUtils

public CloseUtils()
Method Detail

safeClose

public static void safeClose(java.io.Closeable object)
Safely close, absorbing exceptions and handling null graciously.

Parameters:
object - object to close.

safeClose

public static void safeClose(java.net.Socket socket)
Safely close a socket, absorbing exceptions and handling null graciously.

Parameters:
socket - object to close.

safeClose

public static void safeClose(java.net.ServerSocket socket)
Safely close a server socket, absorbing exceptions and handling null graciously.

Parameters:
socket - object to close.

safeClose

public static void safeClose(javax.imageio.stream.ImageInputStream is)
Safely close an ImageInputStream stream, absorbing exceptions and handling null graciously.

Parameters:
is - to close.

safeClose

public static void safeClose(java.sql.Statement statement)
Safely close a JDBC Statement, absorbing exceptions and handling null graciously.

Parameters:
statement - to close.


Copyright © 2011 dcm4che. All Rights Reserved.