Modifier and Type | Method and Description |
---|---|
static void |
close(Closeable closeable)
Closes the specified
Closeable (stream or reader/writer). |
static void |
close(Connection connection)
Closes the specified
Connection . |
static void |
close(DatagramSocket datagramSocket)
Closes the specified resource.
|
static void |
close(ResultSet resultSet)
Closes the specified
ResultSet . |
static void |
close(ServerSocket serverSocket)
Closes the specified resource.
|
static void |
close(Statement statement)
Closes the specified
Statement . |
static void |
closeSilently(Closeable closeable)
Closes the specified
Closeable (stream or reader/writer),
ignoring any exceptions thrown by the close operation. |
static void |
closeSilently(Connection connection)
Closes the specified
Connection , ignoring any exceptions thrown
by the close operation. |
static void |
closeSilently(DatagramSocket datagramSocket)
Closes the specified resource, ignoring any exceptions thrown by the close operation.
|
static void |
closeSilently(ServerSocket serverSocket)
Closes the specified resource, ignoring any exceptions thrown by the close operation.
|
static void |
closeSilently(Statement statement)
Closes the specified
Statement , ignoring any exceptions thrown by
the close operation. |
public static void closeSilently(Closeable closeable)
Closeable
(stream or reader/writer),
ignoring any exceptions thrown by the close operation.closeable
- the resource to close, may be null
public static void close(Closeable closeable) throws IOException
Closeable
(stream or reader/writer).closeable
- the resource to close, may be null
IOException
- if a problem occurred closing the specified resourcepublic static void closeSilently(ServerSocket serverSocket)
serverSocket
- the resource to close, may be null
public static void close(ServerSocket serverSocket) throws IOException
serverSocket
- the resource to close, may be null
IOException
- if a problem occurred closing the specified resourcepublic static void closeSilently(DatagramSocket datagramSocket)
datagramSocket
- the resource to close, may be null
public static void close(DatagramSocket datagramSocket) throws IOException
datagramSocket
- the resource to close, may be null
IOException
- if a problem occurred closing the specified resourcepublic static void closeSilently(Statement statement)
Statement
, ignoring any exceptions thrown by
the close operation.statement
- the resource to close, may be null
public static void close(ResultSet resultSet) throws SQLException
ResultSet
.resultSet
- the resource to close, may be null
SQLException
- if a problem occurred closing the specified resourcepublic static void close(Statement statement) throws SQLException
Statement
.statement
- the resource to close, may be null
SQLException
- if a problem occurred closing the specified resourcepublic static void closeSilently(Connection connection)
Connection
, ignoring any exceptions thrown
by the close operation.connection
- the resource to close, may be null
public static void close(Connection connection) throws SQLException
Connection
.connection
- the resource to close, may be null
SQLException
- if a problem occurred closing the specified resourceCopyright © 1999-2021 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.