org.apache.mahout.common
Class IOUtils

java.lang.Object
  extended by org.apache.mahout.common.IOUtils

public final class IOUtils
extends java.lang.Object

I/O-related utility methods that don't have a better home.


Method Summary
static void quietClose(java.io.Closeable closeable)
           
static void quietClose(java.sql.Connection closeable)
           
static void quietClose(java.sql.ResultSet closeable)
           
static void quietClose(java.sql.ResultSet resultSet, java.sql.Statement statement, java.sql.Connection connection)
          Closes a ResultSet, Statement and Connection (if not null) and logs (but does not rethrow) any resulting SQLException.
static void quietClose(java.sql.Statement closeable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

quietClose

public static void quietClose(java.io.Closeable closeable)

quietClose

public static void quietClose(java.sql.ResultSet closeable)

quietClose

public static void quietClose(java.sql.Statement closeable)

quietClose

public static void quietClose(java.sql.Connection closeable)

quietClose

public static void quietClose(java.sql.ResultSet resultSet,
                              java.sql.Statement statement,
                              java.sql.Connection connection)
Closes a ResultSet, Statement and Connection (if not null) and logs (but does not rethrow) any resulting SQLException. This is useful for cleaning up after a database query.

Parameters:
resultSet - ResultSet to close
statement - Statement to close
connection - Connection to close


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.