org.apache.commons.dbcp2

## Class Utils

- java.lang.Object
- - org.apache.commons.dbcp2.Utils

-     public final class Utils
      extends Object

  Utility methods
  Since:
    2.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `IS_SECURITY_ENABLED`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `closeQuietly(Connection conn)` Closes the Connection (which may be null).
    `static void` | `closeQuietly(ResultSet rset)` Closes the ResultSet (which may be null).
    `static void` | `closeQuietly(Statement stmt)` Closes the Statement (which may be null).
    `static String` | `getMessage(String key)` Obtain the correct i18n message for the given key.
    `static String` | `getMessage(String key, Object... args)` Obtain the correct i18n message for the given key with placeholders replaced by the supplied arguments.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### IS_SECURITY_ENABLED

          public static final boolean IS_SECURITY_ENABLED

  - ### Method Detail

    - #### closeQuietly

          public static void closeQuietly(ResultSet rset)

      Closes the ResultSet (which may be null).
      Parameters:
        `rset` - a ResultSet, may be `null`

    - #### closeQuietly

          public static void closeQuietly(Connection conn)

      Closes the Connection (which may be null).
      Parameters:
        `conn` - a Connection, may be `null`

    - #### closeQuietly

          public static void closeQuietly(Statement stmt)

      Closes the Statement (which may be null).
      Parameters:
        `stmt` - a Statement, may be `null`

    - #### getMessage

          public static String getMessage(String key)

      Obtain the correct i18n message for the given key.

    - #### getMessage

          public static String getMessage(String key,
                          Object... args)

      Obtain the correct i18n message for the given key with placeholders replaced by the supplied arguments.

Copyright © 2001–2014 The Apache Software Foundation. All rights reserved.