org.carrot2.util
Class CloseableUtils

java.lang.Object
  extended by org.carrot2.util.CloseableUtils

public final class CloseableUtils
extends Object

Static methods for closing various objects (including implementations of Closeable).


Method Summary
static void close(Closeable... closeables)
          Close all Closeable, ignoring exceptions.
static void close(Closeable conn)
          Close a Closeable, ignoring the exception if any.
static void close(Connection... connections)
          Close all Connections, ignoring exceptions.
static void close(Connection conn)
          Close a Connection, ignoring the exception if any.
static void close(Socket... sockets)
          Close all Sockets, ignoring exceptions.
static void close(Statement... statements)
          Close all Statements, ignoring exceptions.
static void close(Statement conn)
          Close a Statement, ignoring the exception if any.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

close

public static void close(Closeable conn)
Close a Closeable, ignoring the exception if any.


close

public static void close(Closeable... closeables)
Close all Closeable, ignoring exceptions.


close

public static void close(Connection conn)
Close a Connection, ignoring the exception if any.


close

public static void close(Connection... connections)
Close all Connections, ignoring exceptions.


close

public static void close(Statement conn)
Close a Statement, ignoring the exception if any.


close

public static void close(Statement... statements)
Close all Statements, ignoring exceptions.


close

public static void close(Socket... sockets)
Close all Sockets, ignoring exceptions.



Copyright (c) Dawid Weiss, Stanislaw Osinski