All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jsoftware.impl.CloseUtil Maven / Gradle / Ivy

package org.jsoftware.impl;

import java.io.Closeable;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

public class CloseUtil {

	private CloseUtil() {	}
	
	public static void close(Closeable closeable) {
		try {
			if (closeable != null) {
				closeable.close();
			}
		} catch (Exception e) {	/* firebug ok */ }
	}
	
	public static void close(Statement statement) {
		try {
			if (statement != null) {
				statement.close();
			}
		} catch (Exception e) {	/* firebug ok */ }
	}
	
	public static void close(Connection conn) {
		try {
			if (conn != null) {
				conn.close();
			}
		} catch (Exception e) {	/* firebug ok */ }
	}
	
	public static void close(ResultSet rs) {
		try {
			if (rs != null) {
				rs.close();
			}
		} catch (Exception e) {	/* firebug ok */ }
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy